Page 1 of 1

PHP mail function to send attachment to submitted address

Posted: Sat Jun 27, 2015 8:49 pm
by Wannabecoder
Hi,

Thank you for reading this post.

I am new to PHP so please excuse my lack of knowledge.

I have the following requirement and I was hoping someone would help with the code please.

I need HTML and PHP code that allows a user of the site to enter their email address select an attachment from a drop down list (files contained on the web server) and it will send the chosen file to the email address they have input.

I can't figure out how to make the mail function work with the above scenario.

Please note I need to do this without an SMTP server.

Thank you.

Re: PHP mail function to send attachment to submitted addres

Posted: Sun Jun 28, 2015 3:04 pm
by Celauran
Wannabecoder wrote:Please note I need to do this without an SMTP server.
Not going to happen.

If the files already exist on the server, why bother with email? Why not just let the user download the file?