PHP mail Multiple Attachments

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
User avatar
mikeeeeeeey
Forum Contributor
Posts: 130
Joined: Mon Jul 03, 2006 4:17 am
Location: Huddersfield, UK

PHP mail Multiple Attachments

Post by mikeeeeeeey »

Morning all.

Just wondering, is there any relatively straight forward way of sending multiple attachments from a PHP script?
I managed to beable to send one, but as we all know, one is not enough! hahaha.

I know it's all to do with the MIME type of the email send in the headers, and encoding stuff etc etc, but I can't find any tutorials of sending more than one attachment.

Also, PHPMailer and Swiftmailer are cool, but I'd rather do it myself if anyone knows of any tutorials/articles out there, but after reading it's quite difficult to build a mailer which will work 100%, I may have to resort back.

So if anyone knows anything about this, it would be much appreciated :D

Thanks in advance you guysssss.
marionconsulting
Forum Newbie
Posts: 4
Joined: Thu Feb 01, 2007 1:03 am

Post by marionconsulting »

I would suggest using PHPMailer that you mentioned. Use the resources that are available to you and work smarter not harder. Then you can spend your time writing custom code that doesn't already exist in a pre-packaged form. If you still want to do it yourself, then download the code for PHPMailer and other similar applications that already handle multiple attachments and read the code and understand it. Once you do, then you have your solution. Best of luck!
User avatar
mikeeeeeeey
Forum Contributor
Posts: 130
Joined: Mon Jul 03, 2006 4:17 am
Location: Huddersfield, UK

Post by mikeeeeeeey »

Thanks guys, I'll take a look :D
Post Reply