Re: Pear POP3 and getting the sender's email address
| From: | richardh at phpguru dot org | Date: | Thu, 05 Nov 2009 12:56:30 +0000 |
| Subject: | Re: Pear POP3 and getting the sender's email address | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299640@lists.php.net to get a copy of this message | ||
Hi,
> The problem is, when I extract the "From" header, it's not the email of
> the sender. It's their just their name.
It is probably the fact that it looks like this:
Richard Heyes <richard@foo.com>
Because the address is in angle brackets, it's being interpreted as a
HTML tag by your web browser. Try viewing the sauce and it may be
there. If so, you will need to pass the string through
htmlspecialchars() before displaying it.
If on the other hand you want the envelope sender (ie the SMTP sender
address), then you're out of luck as the envelope is lost when the
email is stored in POP3.
--
Richard Heyes
HTML5 graphing: RGraph - www.rgraph.net (updated 31st October)
Lots of PHP and Javascript code - http://www.phpguru.org