I'm using this library to parse my incoming emails: http://code.google.com/p/php-mime-mail-parser/
I have Mailparse extension installed and everything is fine, but when I do:
echo $from = $Parser->getHeader('from');
It echos out the name
of the email sender, for example: John Smith
, but I need the email
address of the email sender, for example [email protected]
.
This also happens for:
echo $to = $Parser->getHeader('to');
and I can't seem to find any solution to get these, any helps here? Thanks in adnva
You need to apply
htmlspecialchars()
function on to/from: