Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

php imap get from email address

Tags:

php

email

imap

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

like image 644
Frederik Heyninck Avatar asked Aug 08 '10 17:08

Frederik Heyninck


People also ask

What is IMAP in PHP?

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.

What is IMAP account?

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.


1 Answers

$header = imap_headerinfo($imap_conn, $msgnum);
$fromaddr = $header->from[0]->mailbox . "@" . $header->from[0]->host;
like image 139
dlo Avatar answered Oct 09 '22 01:10

dlo