Page 1 of 1

mail() with attachement

Posted: Sat Dec 10, 2011 12:41 am
by jauson
Hi

does anyone know where can i find good tutorial for PHP mail function with attachement?

thanks and regards

Re: mail() with attachement

Posted: Sun Dec 11, 2011 6:03 pm
by Christopher
There is code and examples in the PHP manual. That said, it is a non-trivial task to get attachments working well. There are a number of great mailers that have already gone through the MIME hell headaches, such as SwiftMailer, phpMailer, and mail components from various frameworks.

Re: mail() with attachement

Posted: Sun Dec 11, 2011 6:20 pm
by twinedev
I give a thumbs up to phpMailer, see my reply on the following post for info and a link to it. Be sure to check out examples/test_mail_basic.php in the download for a basic example of how to use it:
viewtopic.php?f=1&t=130020&p=654007#p654007