You may experience an issue when sending emails through a PHP contact form if the email address used in the From field does not belong to a domain hosted on the same server.
Email Sending Requirements
For security and spam prevention:
- The From address must use a domain hosted on your Razorhost hosting account.
- We recommend using an email account created in cPanel as the From address.
- External or unrelated domains should not be used in the From field.
- These restrictions help prevent abuse through compromised contact forms, forums, guestbooks, and other PHP scripts.
- SMTP relaying is not permitted through the local mail server.
Example
If your website is example.com, use:
From: [email protected]
instead of:
From: [email protected]
For contact forms, you can place the visitor's email address in the Reply-To header instead. This allows you to reply directly to the visitor while keeping the From address compliant with the server's mail policy.