- It is necessary to use a valid From: field in email header.
- Change the script to use a valid header.
- The issue will then be resolved.
This is because our servers require you (or your script) to use a properly formatted, valid From: field in the email’s header. If the From: field is not formatted correctly, empty or the email address does not exist in the cPanel, the From: address will be changed to firstname.lastname@example.org
You must change the script you are using to correctly use a valid From: header.
Examples of headers that should work would be:
From: email@example.com will work From: "user" <firstname.lastname@example.org>
Examples of headers that will NOT work:
From: "email@example.com" From: user @ somedomain.com From: firstname.lastname@example.org <email@example.com>
Note: if the above options do not set the sender correctly, please refer to the lower portion of this article in regards to the headers.
Our servers will not accept the name for the email address and the email address to be the same. It will not accept a double declaration of the email address.
If you comfortable editing your PHP mailing scripts, you can also modify the sendmail_path line located in a custom php.ini. You would want to modify it to use a line like this example below. The part that you will be adding is: -f’firstname.lastname@example.org’
sendmail_path = /usr/sbin/sendmail -t -i -email@example.com'
This should work because the php mail function calls sendmail (a program on the server) directly using the path defined in your php.ini. Placing the -f flag here allows us to work directly with sendmail. Passing a “From” header to the php mail function will override the -f flag set in your php.ini.
If the above steps still do not make your form send as the appropriate email address, you may need to add the following headers:
$headers = 'From: firstname.lastname@example.org' . " " . 'Reply-To: email@example.com' . " " . 'X-Mailer: PHP/' . phpversion();
You may also need to use the -f flag in the event the headers are still not being added correctly:
mail($to, $subject, $body, $headers, '-firstname.lastname@example.org');
For content management systems like Joomla and WordPress, you will need to follow their documentation for formatting the from fields properly per their requirements. WordPress will require the Mail From plugin.
Contact form with basic spam protection:
We have provided a basic contact form that you can use. The form has two files that you will need to place in your hosting account. You will need to modify the “email-form.php” file to suite your needs. *please note: this form is provided as a courtesy & we provide no support for modifying it or provide support for coding.
*Note: While our staff will attempt to provide a best effort in providing support for your scripts, we do not provide coding support. In the event your scripts are out of date or not properly coded, you will need to consult with a developer.
If the steps above listed in this article do not resolve your issue, please feel free to open a support ticket and we’d be happy to take a look.
Our Guiding Principles
- Provide consistent, stable, and reliable web hosting services.
- Ensure rapid ticket response and quick resolutions to issues.
- Never saturate or over-provision servers to ensure stability and speed for our customers.
- Use only high-quality enterprise-class hardware to ensure minimal downtime from hardware failures.
- Provide clear pricing with no hidden fees or gotchas.