php imap_fetchbody error in reading the body
Posted: Thu Apr 19, 2012 10:14 am
Hi,
I am trying to write a code to read through a body of a mail into an array(line by line) and store some of the values in to database. I used the imap_fetchbody like this:
imap_fetchbody($this->conn,$msgid,1)
i can get the most of the data in the body but then data wrapped inside < and > tags are not there including the < and > symbols. I am reading the email stored in Microsoft outlook.
Some email details are :
Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
I believe that the data within the "<" and ">" tags inclusive got truncated because the encoding.
Please can you let me know if there is any other function that I can use to get the data as it is or if I am missing some thing in the current function.
Any help is greatly appreciated.
Thanks in advance.
Sathish
I am trying to write a code to read through a body of a mail into an array(line by line) and store some of the values in to database. I used the imap_fetchbody like this:
imap_fetchbody($this->conn,$msgid,1)
i can get the most of the data in the body but then data wrapped inside < and > tags are not there including the < and > symbols. I am reading the email stored in Microsoft outlook.
Some email details are :
Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
I believe that the data within the "<" and ">" tags inclusive got truncated because the encoding.
Please can you let me know if there is any other function that I can use to get the data as it is or if I am missing some thing in the current function.
Any help is greatly appreciated.
Thanks in advance.
Sathish