PDA

View Full Version : attaching file to PHP send form


mek113
10-23-2008, 07:51 PM
I've successfully used the tutorial for "Using DW and PHP to send form results in an email". Is it possible to include an option to attach a file to send with the email? If so, could someone provide the additional code or direct me to a tutorial?

mek113

gavimobile
10-26-2008, 07:57 PM
I've successfully used the tutorial for "Using DW and PHP to send form results in an email". Is it possible to include an option to attach a file to send with the email? If so, could someone provide the additional code or direct me to a tutorial?

mek113

hrm... can you paste your code to start with?

gavi

davidj
10-26-2008, 11:10 PM
its all to do with mime types

i havnt done this myself but this might give you a head start

http://www.codewalkers.com/c/a/Email-Code/PHP-Email-Attachment-v1/

mek113
10-27-2008, 01:01 AM
Thanks for the code. I'll give that a try.

mek113

lux
10-27-2008, 10:52 AM
A php mail class for doing pretty much anything you want:

http://www.swiftmailer.org/

mek113
11-12-2008, 04:12 PM
I came across another reference for attachments to PHP emails at:
http://www.codewalkers.com/c/a/Email-Code/PHP-Text-HTML-Email-with-Attachments-21/

I didn't try it out...coding looked to overwhelming for me...but thought maybe someone else might be interested in testing it.

mek113