Add attachment to contact form


#1

I have a contact form using PHP script and it works great! However I need users to have ability to add attachments which currently does not work. I see everyone reccommends PHPMAILER. I do not have any experience using it. Is there a way to add it to my project so it just handles the attachment function so i do not have to stop using the current PHP script I am using???


#2

Adding attachment(s) to an email involves producing a multi part mime message. The phpmailer class (also see the swift mailer), handles the mechanics of doing this for you. You cannot use the phpmailer for just a part of what you are doing. You would use it for any to, subject, message body, from and reply-to parameters that your code operates on. All you have to do is call the appropriate class methods and properties. There are numerous examples posted on the web.


#3

so would I use PHPmailer to handle all of the form functions with a new script???