Attention GoDaddy Customers!
We've also spoken with GoDaddy.com support on behalf of a customer (January 2009). They've advised us that GoDaddy Windows servers do not support PHP scripts. This seems strange, because PHP scripts actually run on their Windows servers, but they always fail to send email.
So, if you're a GoDaddy customer, the first step is to upgrade to a Linux server instead of a Windows server.
April 2009 update: apparently some versions of GoDaddy Windows servers do allow PHP scripts to send email. We recommend you contact GoDaddy and get a definitive answer for your server if it uses Windows.
Why not start with Hosted Forms?
Our Hosted Forms service offers a way to process your HTML forms. It includes a completely free plan.
You can use this to immediately overcome any problems with sending email from your server, as our server never refuses to send an email to you.
You can use it on a permanent basis, or just temporarily while you diagnose the problem with your own server.
The vast majority (about 99.9%) of webmasters who begin to use Tectite FormMail have no problems.
Of the few that have problems, the most common problem is getting their server to send email.
Over the years we've found some common problems with servers:
- Incorrect installation of PHP onto the server. This is especially true on Windows Servers.
- Special email sending requirements (e.g. the sender must be a valid email address in the website domain, whereas FormMail tries to make the email you receive look like it came From the person who filled out your form).
- Slow email servers. The email arrives hours after it has been sent.
It's important to note that problems with Windows Servers have proven to be the most difficult to solve.
This document is designed to help you solve email sending problems yourself. If you still need help, we can assist you if you subscribe for support.
The main difficulty with diagnosing email problems is that you generally don't know whether the email has been sent and not received or has not been sent in the first place!
Spam filters usually operate at the receiving email address, but sometimes there are outgoing spam filters that block email from being sent.
Your initial aim is to try to determine whether the problem is a sending problem or a receiving problem.
Google Mail (GMail)
In our experience, the spam filters in GMail are quite reliable and, at worst, will send form submissions into the spam folder (where you can see them).
So, it's a good idea to setup a free email account and use this in your form's "recipients" as part of your testing.
One customer has reported that the env_report feature can trigger Google Mail's spam filter.
However, we have not been able to reproduce this behavior.
So, check your HTML to make sure this hidden field is not present.
Once you've done the basic FormMail Configuration, and uploaded FormMail to your server, you should immediately perform a "testalert".
You can test FormMail alert messages (perform a "testalert") at any time by using your browser to open a URL directly to your uploaded FormMail:
Obviously, you replace "yourdomain" with your domain name (e.g. "xyz.com") and replace "formmail.php" with the name you chose for your copy of Tectite FormMail (e.g. "formproc.php").
If FormMail believes it has successfully sent email (this means PHP has told it so), then you'll see a page in your browser like this:
Test message sent. Check your email.
Now, go to your email inbox for the address you set in DEF_ALERT and check for incoming mail.
What is the "testalert" Test?
If there's a problem with your form or your server, FormMail sends you an email to your DEF_ALERT address with details of the error.
This is a simple and secure method of providing you the information you need to solve a problem.
The "testalert" test is a way of proving that your server is able to send you these alert messages.
It's also the simplest way to prove that your server can send email at all!
If all is well, within a few seconds you should receive a message that looks like this:
FormMail alert From: FormMail@www.yourdomain To: youraddress@yourdomain To: youraddress@yourdomain From: FormMail@www.yourdomain This is a test alert message Loaded language is English (builtin) PHP version is 4.3.9 FormMail version is 8.05 Server type: non-Windows DOCUMENT_ROOT: /home/yoursite/public_html SCRIPT_FILENAME: /home/yoursite/public_html/formmail.php PATH_TRANSLATED: /home/yoursite/public_html/formmail.php REAL_DOCUMENT_ROOT: /home/yoursite/www User IP address was 126.96.36.199
To take the next step, choose one of these possibilities:
More than a Test
The test alert (the subject line for the email is "FormMail alert") provides you with lots of useful information.
Of course, the addresses, versions, and paths will be different to those shown above because they are specific to your server. The IP address shown is your PC's IP address where you are using your browser.
In particular, the DOCUMENT_ROOT and REAL_DOCUMENT_ROOT values generally tell you the full directory/folder path to your website on your server.
Depending on your server, they may or may not have the same value. Also, either may or may not be correct, depending on the diligence of your hosting provider.
If you receive this email, then you know that you'll be able to receive form results, but you still may have problems and may need the other information on this page.
Try submitting your form again. However, remember that you should enter real test data (not junk) and use an email address that is not part of your website. Remember: people filling in your forms are not you! Some email software and spam filters immediately block email sent To and From the same email address.
If you don't have a valid email address outside your website that you can use when filling in your form, feel free to use "mailtest AT tectite DOT com". It's a valid address on our server.
If, when you test your form, you receive an alert that says "Failed to send mail", please read this section.
Here's the next step: if you receive alerts but not form results.
Many spam filters simply don't work (this means they block, discard, or redirect emails that are not spam).
So, it's quite possible that this valid "testalert" email sent from your server has been discarded or placed in a spam folder.
Have you waited long enough? Some servers can take a ridiculous amount of time to send an email. Sometimes many minutes. Very faulty servers may take an hour or more.
What about your receiving email address? Does it receive emails quickly? Try testing by sending emails to yourself from another email account. There are many free email services you can sign up to, and that's useful for troubleshooting email problems.
It's reasonable to expect an email to be sent and received in under 30 seconds.
If you've waited long enough and have not received the test alert email, check your spam filters.
If you don't have a spam filter problem, then you may need to contact your hosting provider and ask them why the email that was reported to be sent was not sent.
You can also utilize the test mail scripts mentioned below.
Also, ask your hosting provider to supply you with a simple PHP script that can send email. There may be a special configuration required, for example, the use of PHP functions such as "ini_set", or environment variables that need to be set.
If you run the test alert but get a message in your browser indicating there was an error, you may need to contact your hosting provider and ask them why there was an error. You can also utilize the test mail scripts mentioned below.
You may need to set one or more of these configuration settings inside FormMail to get your alert messages to work:
We also recommend you use our very simple test mail scripts stored on our forums.
The test mail scripts will help reveal what you need to do to send email.
Once you get alert messages working, you are very close to having the correct settings required for your server.
If you still cannot receive form results after following our testing instructions above, then it may be that your server refuses to send emails that appear to be From an email address outside your domain.
The next step is to try the FromAddr feature of mail_options. This involves selecting a valid email address in your domain (website) that is, preferably, different to the email address that receives your form results.
You then create a hidden field in your HTML form that specifies this address:
<input type="hidden" name="mail_options" value="FromAddremail@example.com" />
If this still doesn't work, then your server may need the Sender (also known as the Return Path) to be set to a valid address in your domain. To do this, make sure you have at least version 8.05 of FormMail, and try setting the FIXED_SENDER configuration in FormMail to a valid email address in your domain.
You should try FIXED_SENDER with and without FromAddr.
If you test your form and receive an email (alert message) from FormMail that says "Failed to send mail", please read this section.
Since your server has sent an email that says it cannot send an email, this seems somewhat contradictory! However, it simply indicates that some emails work (sending alerts) but sending form results has a problem.
This generally means your mail server does not like the From address being an email address outside your domain. Remember, FormMail tries to make the form results you receive look like an email from the person submitting the form. This is the easiest way to work with form results, because you can just reply to the email to contact the person who filled in your form.
To solve this, please read this section.
If you've followed the steps above and still cannot get a solution, and you've tried our test mail scripts, then it's time to ask your hosting provider to supply you with a small PHP script that can send email.
You can also subscribe for support from us and we'll use the script supplied by your hosting provider to help you configure FormMail to work on your server.