mail() with attachement

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jauson
Forum Contributor
Posts: 111
Joined: Wed Oct 05, 2011 12:59 am

mail() with attachement

Post by jauson »

Hi

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

thanks and regards
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: mail() with attachement

Post 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.
(#10850)
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

Re: mail() with attachement

Post 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
Post Reply