I can't decode gmail html message when i use imap (PHP)

216 views Asked by At

Im a newebie developer, i use imap with gmail on my own PHP application.

The problem, when i try to decode a gmail html message (Specially google+/linkedin). It is displayed in an original (coded) format. I want to display it in standard format as it is displayed on GMAIL.

For Example :

Original Message on GMAIL : Image (click here)

Message on my application : Image (Click here)

Best Regards,

1

There are 1 answers

2
delboy1978uk On

That looks like base64 encoding. So decode it!

$hopefullyTheHtml = base64_decode($string);

http://php.net/manual/en/function.base64-decode.php