email - php imap reading body message -
i writing simple php script reading emails.
when extract mail body with:
imap_body($mbox, $i);
i have returned this:
--0016e6db2b334d4d7904a883f4ec content-type: text/plain; charset=iso-8859-1 <the message arrived> --0016e6db2b334d4d7904a883f4ec content-type: text/html; charset=iso-8859-1 <the message arrived> --0016e6db2b334d4d7904a883f4ec--
how can extract only: ? using php_imap.
thanks.
if using imap, can use imap_body() function read body. php has ton of functions parsing email.
http://www.php.net/manual/en/ref.imap.php
check out fetch_body() function too. allow part of body.
http://www.php.net/manual/en/function.imap-fetchbody.php
for example:
$message = imap_fetchbody($inbox,$email_number, 1.2);
Comments
Post a Comment