使用https://github.com/ddeboer/imap,结合office365帐户,我需要检索发送电子邮件的电子邮件地址。
要检索,我使用:
$message->getFrom()
但结果是:
Ddeboer\Imap\Message\EmailAddress Object
(
[mailbox:Ddeboer\Imap\Message\EmailAddress:private] => my
[hostname:Ddeboer\Imap\Message\EmailAddress:private] => email.com
[name:Ddeboer\Imap\Message\EmailAddress:private] => Full Name
[address:Ddeboer\Imap\Message\EmailAddress:private] => my@email.com
)
如何仅检索此对象中的最后一部分(我需要my@email.com)