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
php imap_fetchbody error in reading the body
Moderator: General Moderators
-
sathish_nec
- Forum Newbie
- Posts: 1
- Joined: Thu Apr 19, 2012 10:11 am
Re: php imap_fetchbody error in reading the body
imap_fetchbody() only retrieves a section of the body. I'm not really familiar with it - but perhaps the < & > are delimiting a new section? Maybe imap_body() would work better.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.