Send form mail using an SMTP relay server
To send form mail, we recommend using applications or scripts that use the PHP mail() function (for example, Contact Form 7 for WordPress). But if your contact form requires Simple Mail Transfer Protocol (SMTP), you can use the relay settings below.
Note: While we're happy to provide information on form mail, we do not directly support the functions and reliability of third-party plugins, scripts, or mail providers. For more information, view the Statement of Support.
Setting | What to use |
---|---|
Port | 25 |
SMTP Authentication | False, None, or turn off |
SSL or Secure Connection | False, None, or turn off |
Server or Host1 | localhost |
Add or edit your SPF record2 | v=spf1 include:secureserver.net -all |
Send mail from3 | An email address where you manage DNS4 |
- If you use a PHP script and the
mail()
function, you do not need to specify a relay server. - If you use an SMTP relay server, you must add or edit the appropriate SPF record. Without this, your form emails can fail authentication and not be received. Do not use multiple SPF records. If you require multiple values, merge them into a single record.
- Send form mail from a specific email address. Your email address must have a mailbox to receive replies or bounceback messages.
- For example, if you enter user@mycoolexample.com, you must add or edit the appropriate sender policy framework (SPF) record to the DNS for mycoolexample.com. Do not add third-party email addresses (such as Gmail or Yahoo) because you do not manage DNS for those domains, causing your form emails to fail authentication and not be received.
Setting | What to use |
---|---|
Port | 25 |
SMTP Authentication | False, None, or turn off |
SSL or Secure Connection | False, None, or turn off |
Server or Host1 | relay-hosting.secureserver.net |
Add an SPF record2 | v=spf1 include:secureserver.net -all |
- If you use a PHP script and the
mail()
function, you do not need to specify a relay server. - If you use an SMTP relay server, you must add the appropriate sender policy framework (SPF) record. Without this, your form emails can fail authentication and not be received.
More info
- Hosting email relay limits
- Set up Contact Form 7 in WordPress
- Learn more about mail from PHP.net.
- Learn more about wp_mail() from WordPress.