I use php imap functions to retrieve email content from my mail server.
So far, this has worked fine with the headers, but I would like to get a βcleanβ text that contains the message.
At the moment, it looks like this:
Body:
--Apple-Mail=_0DCDC337-EC65-4217-B5CB-B3A2675D8573
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
This is the text i want
--Apple-Mail=_0DCDC337-EC65-4217-B5CB-B3A2675D8573
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
charset=utf-8
Quoted text
--Apple-Mail=_0DCDC337-EC65-4217-B5CB-B3A2675D8573--
This is the result if I use:
$body = imap_body($connection, $moverview->msgno,2);
It would be best if I received only the last text ("This is the text I want") - not even quotes.
Any idea how I could solve this?
Thanks in advance: -)
source
share