Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

imap_fetch_body help

Status
Not open for further replies.

MrBelfry

IS-IT--Management
May 21, 2003
289
Hi tippers

I'm trying to develop a script that checks an email account for emails with attachments and copies the attachment to a webserver. So far so good but imap is confusing me and I want to drive a truck over my head.

What I now want to do is have the user be able to specify some options in the body of the email e.g. if a user emails a rota when should it be removed from the website?

I can get the content of the email using imap_fetch_body($inbox, $msg_num, 1) - the key bit being the 1 which specifies what part of the email I want. This produces the content below

Code:
--00151747859abd045f0475f9b019
Content-Type: text/plain; charset=ISO-8859-1
 
section: housegroupsstarts: today
expire: 2 weeks
text: Hey how are you
 
--00151747859abd045f0475f9b019
Content-Type: text/html; charset=ISO-8859-1
 
section: housegroups<div>starts: today</div><div>expire: 2 weeks</div><div>text: Hey how are you</div><div><br></div> 
 
--00151747859abd045f0475f9b019--
        )
 
)
How do I simply get the actual text that the user entered into outlook or gmail without the content-type etc info? Am i even approaching the subject in the right way?

Thanks

Richard

MrBelfry
 
if you're interested I will post up my mail handling class in a day or so. but it sounds like you've got it sorted.
 
That would be great. I have it working but it would be interesting to see what you've done. Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top