diff options
author | Charly Root <root@muse-sequencer.org> | 2013-10-08 00:00:53 +0200 |
---|---|---|
committer | Charly Root <root@muse-sequencer.org> | 2013-10-08 00:00:53 +0200 |
commit | a1632d25fc46d130357c23c2304b5b73be8894f1 (patch) | |
tree | 8ad8fd45b88d89b74d03e2c0e24c2a9abce678cd /src/EmailMessage.php | |
parent | f1dc6c534e9eb5071ca3ab3604a863ef878ca5ef (diff) |
allow posting by unknown email addresses
Diffstat (limited to 'src/EmailMessage.php')
-rw-r--r-- | src/EmailMessage.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/EmailMessage.php b/src/EmailMessage.php index 6c025ab..dd25045 100644 --- a/src/EmailMessage.php +++ b/src/EmailMessage.php @@ -68,6 +68,16 @@ abstract class EmailMessage implements Message { return $from[0]['address']; } + public function getFromDisplayName() { + $from = mailparse_rfc822_parse_addresses($this->getHeader('from')); + if ($from[0]['address'] != $from[0]['display']) { + return $from[0]['display']; + } + else { + return ''; + } + } + public function getSubject() { return $this->getHeader('subject'); } |