Knowledgebase

Back to Troubleshooting

How To Troubleshoot Mail Or Contact Form Scripts


If you use a form or script on your website that sends e-mail, but notice that it is not working, then here are some generic steps that might help you figure out what has gone wrong.

If you are not receiving messages submitted by the form:

  1. Find the page that is submitting the form.
  2. Look at the code and search for the part that says action=”
  3. Be interested in what follows the action, if it is another .php file or some other script you can identify what is being used to send the mail.
  4. Once you know what file is sending the mail you can check that file for the e-mail address. If it is a file hosted elsewhere then your troubleshooting would shift to that remote location.

Some general ideas are [though not a comprehensive list]:

You need to verify that your domain is pointed correctly to our server for your hosting account.
If The e-mail address you’re sending to is not one handled by WestHost, then it may be getting blocked by the remote location's mail servers.
If your MX Record is not pointed to WestHost you may need to select "Remote" under the MX Entry settings to make sure the server is checking the MX correctly to send out.

A simple php mail script looks like the following,

<?php
//syntax is mail(‘recipient’,' subject’, 'message’);
mail(‘user@domain.com’, ‘Test Message’,' This is a test and only a test);
?>

this is a simple php mail script and there are much more advanced things you can do with the mail function. The above function can also be used to test that PHP mail() is working. For more advanced usage of the mail function please see, http://php.net/manual/en/function.mail.php



Related Articles

My Emails I Send Are Being Received In The Junk Folder
Can I Backup My Outlook Mail Data
How To Change An Email Account Password
How To Change An Email Forwarder Into Full Email Account
How To Create An Email Account

Can’t Find what you need?

No worries, Our experts are here to help.