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
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
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--
)
)
Thanks
Richard
MrBelfry