By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,722 Members | 1,874 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,722 IT Pros & Developers. It's quick & easy.

Sample of reading mail

P: n/a
Is there some code example how to read/send e-mail with PHP ?
Beside this i need to pull out the attachment and to save it in some
directory.

Any idea?
Sep 24 '08 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Intos wrote:
Is there some code example how to read/send e-mail with PHP ? Beside
this i need to pull out the attachment and to save it in some directory.
How do you receive the email? POP3, mbox, IMAP, MAPI, Webmail, Maildir?

Sending mail can be done with mail().
Sep 24 '08 #2

P: n/a
On 24 Sep, 06:52, "Intos" <in...@mail.comwrote:
Is there some code example how to read/send e-mail with PHP ?
Beside this i need to pull out the attachment and to save it in some
directory.

Any idea?
Anything wrong with the first 2 articles listed in the Google search
of:
php read email attachment
???
Sep 24 '08 #3

P: n/a

"Intos" <in***@mail.comha scritto nel messaggio
news:gb**********@localhost.localdomain...
Is there some code example how to read/send e-mail with PHP ?
Beside this i need to pull out the attachment and to save it in some
directory.

Any idea?
I cannot write down a full sample, that would be a bit long.

You should parse the received message in the part of the attachments, detect
the transfer encoding and decode the attached file(s).

A document about decoding the Attachments
http://pages.prodigy.net/michael_santovec/decode.htm

A decent attachment decoder (from scratch) will require you hours of work.

You can give a look at portions of code of the various php webmail
(uebimiau, nocc, atmail, etc) scripts
or crms like sugarcrm. They all should include a mime recognition and the
complete parsing/decoding of the emails.
Regards
L. A. Iarrusso

http://www.j2be.com
Sep 24 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.