Jump to content

Fetching someone's email address. Big Question


Recommended Posts

How can I fetch an email with php, then grab the header information and insert it into a database?

 

For example, lets say there are 2 sites.

1. Mysite

2. Theirsite

 

On theirsite, they have a form to contact people so that those people's email address isn't exposed. On mysite, I'm wanting to be able to send an email through the form (I can do this), and when that person replies to the email, the php script fetches the email headers and puts them in "mysite"s database.

 

Anything is possible, I just need help. I don't even know where to begin searching on google with this.

 

Wes

$mbox = imap_open("{mail.mysite.com/novalidate-cert}", "[email protected]", "password", OP_READONLY)
     or die("can't connect: " . imap_last_error());

$headers = imap_headerinfo($mbox,4/*message id number*/);

echo $headers->reply_to[0]->mailbox.'@'.$headers->reply_to[0]->host;

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.