Sending Mail using HTML Form

Sending Mail using HTML Form

You can use the mail-form script located attached to this KB article.


To use, please do the following:



1) Unzip mail-form.zip



2) Download phpMailer class from http://phpmailer.worxware.com/ or http://sourceforge.net/projects/phpmailer/files/phpmailer%20for%20php5_6/



3) Unzip phpMailer and put folder in the mail-form folder



4) Rename phpMailer_VERSION to just phpMailer -- this will be simpler
for setup. If you don't do this, you will need to update the variable
in the script for the phpmailer location



5) Open mail-form.php using notepad, textedit, or a PHP developing program. Don't use Word or other such programs, however.



6) Go to the configuration section in the script and update SMTP_host, SMTP_user, SMTP_pass, SMTP_toAddr and SMTP_toName



7) In configuration section, put in a URL for the thanks page. It needs to be a complete URL.



8) Upload the mail-form folder, with phpMailer folder, to your FTP space --> domain directory



9) Set your HTML form's action to post to the mail-form/mail-form.php
file. Action can be set to complete URL or relative location -- http://domain.com/mail-form/mail-form.php
or /mail-form/mail-form.php . There is an example HTML form in the
mail-form folder to help with this. The mail-form.php file also has
notes at the top.