How do I retrieve the email address from an email with imap_open?
If the sender name is known I get the sender name instead of the email address if I use the 'from' parameter.
Code: http://gist.github.com/514207
IMAP stands for Internet Mail Access Protocol, PHP-IMAP functions helps you to access an email account and fetch emails from them. Using these functions you can also work with NNTP, POP3 protocols and local mailbox access methods. With the help of this library you can create web applications that handle your emails.
IMAP (Internet Messaging Access Protocol) With IMAP accounts, messages are stored in a remote server. Users can log in via multiple email clients on computers or mobile device and read the same messages.
$header = imap_headerinfo($imap_conn, $msgnum);
$fromaddr = $header->from[0]->mailbox . "@" . $header->from[0]->host;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With