Hosting Knowledge Base
How to Get an Existing PHP Contact Form to Work?
If you have a PHP contact form that is unable to send messages, try the solution provided below.
Open your contact form’s PHP file in a text editor and insert the following code into it:
Save the changes you have just made, and then run your script in a browser to test its sending capabilities.
Note: Make sure you replace
email@example.com with a valid e-mail address created through our system. If you have not yet had a chance to set up an e-mail address on your AwardSpace mail server, please review our How to create an email account? article for more information on how to craete an e-mail ID.
The above code basically sets the e-mail address entered in the contact form to be set as “Reply-To” header and you set your e-mail address created through our system as a sender (“From” header).
It is important to note that these changes need to be added to the
$headers variable, so it is vital that you add them to the PHP mail() function.
If your PHP script already contains the
$headers variables, you will have to add the same code but with a small tweak:
Basically, you will need to put a dot (.) between the $headers variable and the equal sign.
Again, make sure you replace
firstname.lastname@example.org with a valid AwardSpace e-mail account.