September 14th, 2018, 10:48 AM
-
Secure JS + PHP script to send email with attachment?
Hello,
I only have average coding skills, and need to write a web form to let users 1) fill a few fields, 2) attach a text file, and 3) send everything to a PHP-enabled shared server that will take care of building the email and sending the whole thing to a mailbox.
I'd like to find some secure JavaScript > Ajax > PHP code to reduce the risk of SPAM/viruses to the minimum.
I found this, but it performs no check on the client-side:
https://www.geeksforgeeks.org/php-se...achment-email/
Also, someone does not "recommend using a php script to send mail with attachments (rather supply a downloadlink and store the document on the server for retrieval for the mail target)".
Would someone have code handy I could use?
Thank you.
September 15th, 2018, 08:38 AM
-
Someone suggested you to use PHPmailer, did you have a look at that?
There should be several tutorials on the net about form validation, I suggest you also look at some of those.
If you have a form and want to "prevent" (read: limit) the bots, you have to look into captcha like solutions.
There is a "Hire A Programmer" forum if you just want the solution.
September 16th, 2018, 03:27 AM
-