0

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 Answers1

1

That looks like base64 encoding. So decode it!

$hopefullyTheHtml = base64_decode($string);

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

delboy1978uk
  • 12,118
  • 2
  • 21
  • 39
  • thank you for your reply , when i used base64_decode , the message is decoded to text format, it's good but i want to get html format. – Majda Goura Sep 21 '17 at 10:35
  • When i use "imap_fetchstructure", it return Transfer encodings value = "4" that corresponds to "Quoted-Printable". http://php.net/manual/en/function.imap-fetchstructure.php "Quoted-Printable" work only for simple message, but does'nt work for message received from Google+ for example. – Majda Goura Sep 21 '17 at 10:56