Contact Form Advanced can send each form message through a real email account, using that account's outgoing mail settings (SMTP). This is the most reliable way to receive form messages, and it's what we recommend for most websites.
SMTP settings are only in Contact Form Advanced, not in the plain Contact Form.
How the form sends mail
Under Mail Sending in Widget Settings you have three choices:
| Choice | How it sends |
|---|---|
| SMTP Details | Signs in to your email account and sends through it. This article explains how. |
| PHP Mail | Your web server sends the message itself. There's nothing to set up, but some hosts block it or it ends up in spam. |
| EverWeb | EverWeb's server sends it. Needs the Contact Forms Enhanced add-on. If you have the add-on, choose this and skip the rest of this article. |
With SMTP Details, the form sends each message from the address in Email Address to Send Form to, to that same address. When you click Reply, your reply goes to the visitor, as long as your form has an email field.
So the SMTP account must be the same address as Email Address to Send Form to. Most failures come from mixing two different accounts.
Choose the address
Use an address at your own domain, such as [email protected]. If you'd rather read messages in Gmail, iCloud or Outlook, forward that address to them. See My contact form isn't sending me emails.
Find your SMTP details
Use your email settings, never your FTP login or your EverWeb account password.
| Where your email is | Server | Username | Password | Port and Security |
|---|---|---|---|---|
| EverWeb + Hosting | mail.yourdomain.com (or your server name), from Email settings for Apple Mail, Outlook, Gmail and other apps (IMAP, POP, SMTP) |
full email address | that address's email password | 465 and ssl |
| Another hosting or email company | ask them, often mail.yourdomain.com |
usually the full email address | that address's email password | ask them |
| Gmail or Google Workspace | smtp.gmail.com |
full Gmail address | a Google App Password, not your normal password. It needs 2-Step Verification turned on. | 465 and ssl, or 587 and tls |
Outlook, Hotmail, iCloud and Yahoo addresses often need an app-specific password, and some won't let a website send with a password at all. If yours won't work, use an address at your own domain.
Enter the settings
- Select the form on your page, then go to Inspector > Widget Settings.
- Check Email Address to Send Form to.
- Set Mail Sending to SMTP Details.
- Under SMTP Settings, enter Server, Username and Password.
- Set Security and Port together: ssl with 465, or tls with 587. EverWeb changes the port when you change Security. If you type an incoming mail port such as 993, EverWeb warns you and changes it.
- Click Test SMTP Details.... EverWeb sends a message called "Test Email from EverWeb" to Email Address to Send Form to. Check that it arrives, and look in your spam folder too.
- Go to File > Publish Entire Site.
- Open the page in a private browser window, fill in the form and send it.
Forms only send from your published website, not from Preview.
The test works, but the live form doesn't
Test SMTP Details... connects from your computer. The live form connects from your web server, which is a different computer at a different address. So the test can pass while the form still fails.
When the live form fails, the visitor sees a message that starts "Could not send email:". The rest tells you why:
| Message | What to do |
|---|---|
| Incorrect login details | Check Username and Password. For Gmail, use an App Password. |
| Can't connect to ... | Check Server and Port. If they're right, your web host or your mail server may be blocking the connection. Ask both. |
| Unable to send MAIL FROM command | The mail server won't send as Email Address to Send Form to. Use the SMTP details for that exact address. Then try 465 with ssl if you used 587. |
| fsockopen not enabled in PHP | Ask your web host to turn on fsockopen. |
| "An error occurred while sending the contact form. Check the developer console for errors." | See An error occurred while sending the contact form. Check the developer console for errors. |
On another web host? Some hosts block website scripts from connecting to outside mail servers. We recommend PHP 8.2 or later. You can send your host this:
My website's contact form is a PHP script that sends email by connecting to [your SMTP server] on port [465 or 587]. Can scripts on my hosting account make that connection? Which PHP version is my website using?
Messages arrive in spam
Sending through your own domain's account helps, because the message comes from a server that's allowed to send for your domain. If your email is with another company, ask them to check your domain's SPF record (the setting that lists which servers may send mail for your domain). Add the form's address to your contacts too.
Ask us
Send us the page address, the exact message the form showed, whether Test SMTP Details... worked, and a screenshot of Widget Settings with your password hidden.
