Overview
This article explains how the 'From' address should be configured in a WordPress contact form to ensure the email is delivered.
Background
The 'From' address of the contact form
The 'From' address your contact form uses should always be an address on your website's domain, such as <contact@example.com> (assuming your website is example.com).
WordPress should never use the visitor's email address entered into the form as the 'From' address.
The visitor's email address
The email address the site visitor enters in the contact form can instead be placed in the Reply-To header. See this article for further details about DreamHost's 'Send domain policy'.
Examples
Below are the recommended configuration settings for popular WordPress form plugins.
Contact Form 7
Contact Form 7 is a contact form plugin that lets you send emails with the name of the site visitor and a site admin's email address.
To set up Contact Form 7:
- Log in to your WordPress site.
- Click Plugins in the left column, and then click Add New at the top.
- Search and install Contact Form 7.
- On the Plugins page, click the Settings link.
- Find the specific contact form you wish to edit, and then click its Edit link.
- Click the Mail tab at the top.
-
Adjust your From and Additional Headers fields as shown in the examples below:
- [your name] <wordpress@example.com>
- Reply-To: [your name] <[your email]>
Jetpack contact form
It's recommended that you disable the Jetpack contact form as it does not have an option to easily adjust the 'From' address and its shortcodes can interfere with other contact forms. Jetpack's contact form is not enabled by default. However, if you've enabled it in the past, you can disable it and use a different plugin's contact form.
To disable Jetpack's contact form, log into your WordPress panel and visit the Jetpack modules page at the following URL:
- example.com/wp-admin/admin.php?page=jetpack_modules
Hover over the Contact Form option and click the Deactivate link on the right.
WPForms-lite
WPForms-lite allows you to change the 'From' and 'Reply-To' in its settings.
- Log in to your WordPress site.
- Search and install WPForms-lite.
- Click the WPForms menu item in the left pane.
- Hover over your form name. A few options appear below it. Click Edit. This loads your form.
- Choose Settings in the left menu.
- Choose Notifications in the pop-out window.
- Scroll down to the 'From Email' and 'Reply-To' email fields and update as necessary.
- From Email: {field_id="1"}
- Reply-To: [your email]
What if I want to use a 'From' email that is NOT on my domain?
If you do not want to use a 'From' email that's on your domain (such as contact@example.com), you can force SMTP authentication by using a plugin. See this article for further details.