Wpforms как настроить email

How to Set Up SMTP Using the WP Mail SMTP Plugin

Have you set up forms on your WordPress site, only to find that the emails aren’t getting delivered? It’s common to see email delivery issues in WordPress, but this can be fixed by using WP Mail SMTP for reliable, authenticated email delivery.

In this tutorial, we’ll show you how to use WP Mail SMTP to fix email delivery issues on your WordPress site.

Why Aren’t Emails Getting Delivered?

There are two main reasons that WordPress emails don’t deliver successfully: server configuration and spam filtering.

WordPress, and WordPress plugins, will by default send email using the PHP mail() function. This is a simple way of sending email, and many WordPress hosting servers are not configured to use this mail() function.

In addition, your email provider checks all incoming email to determine if it should be allowed to deliver, sent to spam, or blocked entirely. One way it will do this is by checking if the email is originating from the same location it claims to be sent from.

For example, if your email server is gmail.com but your email claims to be sent from your website’s domain, your form notification may be blocked before it even reaches the spam folder.

How to Fix Email Delivery Issues

SMTP (Simple Mail Transfer Protocol) will fix email delivery issues by changing the way your emails are sent and by properly authenticating them. SMTP is the industry standard for ensuring email deliverability, and WP Mail SMTP is the most flexible way to connect to many different SMTP services.

Below is a list of all of the ways you can use WP Mail SMTP to set up SMTP on your site, along with links to tutorials on each:

  • Gmail or G Suite: Works only with Google emails, more secure, no subscription
  • Mailgun: Works with any email, more secure, requires subscription
  • SendGrid: Works with any email, more secure, requires subscription
  • Sendinblue: Works best with domain-based emails, more secure, limited free plan, subscription required for all features
  • Other SMTP: Works with any email, less secure, no subscription

SMTP Settings Overview

SMTP must be able to connect to your email provider, which is why it requires additional setup through a plugin like WP Mail SMTP.

Unlike our other options, which use APIs to allow this setup information to be stored with Google, SendGrid, Sendinblue, or Mailgun, the Other SMTP option in WP Mail SMTP requires this setup information to be stored directly on your site.

Below, we’ll go into more detail on each of the fields required to set up an “Other SMTP” option in WP Mail SMTP.

Other SMTP: Fields Needed When Using Less Secure, Traditional SMTP

SMTP Host
This is the address to the host’s SMTP server.

SMTP Port
The most common ports are 587 and 465, however, hosts can and do change these. It’s not uncommon for web hosts to block these ports, so before you begin it’s always good to verify with your web host that the required port is open. If closed, most of the time your hosting provider can open it for you.

Encryption
SSL and TLS are the most widely used encryptions. If your email provider offers both, we recommend TLS. It is worth noting that usually TLS encryption is used with port 587, while SSL is used with port 465.

Authentication
Modern email providers require authentication. Disabling it may be needed for local development or other edge case scenarios, however, most providers need this turned on.

SMTP Username
Your username is typically your email address for the email provider; e.g. [email protected] or [email protected] Some providers such as AOL require the non-email format; e.g. if your email is [email protected] your username is john_doe.

SMTP Password
This is your email account password.

When filling out the fields mentioned above, the settings you’ll need depends on your email provider.

Here are the SMTP settings you’ll need for the most popular email providers:

Gmail / G Suite SMTP Settings

Host: smtp.gmail.com
Port: 587 (or 465 using SSL encryption)
Username: Your Gmail account email address (e.g. [email protected])
Password: Your Gmail account password
Encryption: TLS

Note: We recommend using the built in Gmail integration instead of the SMTP method. If you use SMTP, don’t forget to enable less secure apps.

Outlook.com SMTP Settings

Host: smtp-mail.outlook.com
Port: 587
Username: Your Outlook.com account email (e.g. [email protected])
Password: Your Outlook.com account password
Encryption: TLS

Office 365 SMTP Settings

Host: smtp.office365.com
Port: 587
Username: Your Office 365 account email
Password: Your Office 365 account password
Encryption: TLS

Hotmail SMTP Settings

Host: smtp.live.com
Port: 587
Username: Your Hotmail account email (e.g. [email protected])
Password: Your Hotmail account password
Encryption: TLS

Читайте также:  Не работает контекстное меню мой компьютер
Yahoo Mail SMTP Settings

Host: smtp.mail.yahoo.com
Port: 465
Username: Your Yahoo Mail account email (e.g. [email protected])
Password: Your Yahoo Mail account password
Encryption: SSL

Note: Please note you will need to to enable less secure apps.

AOL SMTP Settings

Host: smtp.aol.com
Port: 587
Username: Your AOL screen name (e.g. john)
Password: Your AOL account password
Encryption: TLS

Zoho Mail SMTP Settings

Note: Zoho offers two types of email addresses: free accounts (i.e., [email protected]) and domain-based accounts (i.e., [email protected]). Each type of email requires different SMTP settings (shared below).

Emails @zoho.com
Host: smtp.zoho.com
Port: 587 (or 465 using SSL encryption)
Username: Your Zoho Mail account email (e.g. [email protected])
Password: You will need to generate an app password for your account.
Encryption: TLS

Emails @yourdomain.com
Host: smtppro.zoho.com
Port: 587 (or 465 using SSL encryption)
Username: Your domain-based email (e.g. [email protected])
Password: You will need to generate an app password for your account.
Encryption: TLS

That’s it! By using WP Mail SMTP, you’ll be able to get your site’s email delivering successfully.

Still seeing issues when you try to connect with SMTP? Be sure to check out the section below for the most common questions and issues.

Frequently Asked Questions and Common Issues

My SMTP test email delivers successfully, so why aren’t my form notification emails delivering?
If your test email is successful, this means that the SMTP is all set. Instead, you’ll need to check the form’s notification settings by opening the form builder and going to Settings » Notifications. From here you can check all settings, but specifically note the From Email (remember, this must match the email used to set up the SMTP).

My site’s hosting provider is GoDaddy and I can’t get SMTP to work. What can I do?
In many cases, GoDaddy will, by default, block the ports required for SMTP. To address this, you’ll need to reach out to GoDaddy’s support to ask them to open up the port you need for your site.

Error: Could Not Open Socket
This usually happens when your web host is blocking the ports required to connect. A lot of times this is due to a firewall that is running. Contact your host and ask them to open the port being used. Also, double-check your port and encryption settings, as accidentally using SSL over port 587 can trigger this error.

Error: smtp connect() failed
The connection to the SMTP host failed. Typically this error is returned when the SMTP settings are incorrect or the SMTP host is denying/blocking the connection for security purposes. Some hosting providers, such as GoDaddy, may specifically be blocking the port needed for SMTP.

Be sure to double-check all of your settings, including your email and password. If the error persists, the best next step is to contact your site’s hosting provider to ask them to check for any server issues.

Error: Connection Refused
A firewall may be preventing the connection. Contact your web host and ask them to open the port being used.

Error: Mod_Security
“Not Acceptable! An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security.”

This error most commonly occurs when the server is blocking requests needed to run SMTP. To fix this, you’ll need to contact your site’s hosting provider and ask them to disable specific rules within Mod_Security, which they can determine using server logs.

Error: 535 Incorrect authentication data
“SMTP ERROR: Password command failed: 535 Incorrect authentication data”

This error generally results from overly strict server permissions, which your hosting provider should be able to help you resolve. For WHM/cPanel server management, you can specifically ask your site’s hosting provider to switch the “Restrict outgoing SMTP to root, exim, and mailman” setting from “On” to “Off”.

Источник

How to Set Up Form Notification Emails in WPForms

Would you like to automatically send out emails when your form is submitted? WPForms makes it super easy to set up notifications and email them as soon as a user submits a form on your site.

In this tutorial, we’ll discuss all the options for notification emails in WPForms.

Before getting started, you’ll first need to make sure WPForms is installed and activated on your WordPress site and that you’ve verified your license. Then you can create a new form or edit an existing one to access the form builder.

Setting Up a Notification Email

After opening the form builder, go to Settings » Notifications to access all of the notification options for your form.

By default, notifications will be enabled for your form. To disable them, toggle the Enable Notifications option to the off position.

Or, leave it toggled on to set up your first notification email. You can then customize the default notification provided.

First, if you would like to change the name of this notification, you can do so by clicking on the pencil icon.

Then there are several fields you’ll need to fill out to set up your notification email. We’ll explain each in detail below.

Send To Email Address

In this field, you can add any email address as a recipient for this email notification.

By default, the Send To Email Address will be set to the Smart Tag, which pulls the administrator email from your WordPress settings. However, you can replace this or add additional emails if you’d like.

Note: Not sure what your site’s administrator email is? WPBeginner’s guide to changing this WordPress setting will help you find it.

Читайте также:  Как настроить редми 8 от рекламы

If you’re adding more than one recipient email address, be sure to place a comma in between each email.

Note: Each of the addresses in the Send To Email Address field will receive a completely separate email, so recipients won’t be able to see each other’s email addresses.

If you’d like recipients to be able to see one another’s emails, see the CC field described later in this tutorial.

To learn how to send emails to different recipients based on users’ form selections, be sure to check out our tutorial on conditional form notifications.

Email Subject Line

When you create a new form, the default Email Subject Line will read “New Entry” followed by the name of the form.

If you’d like to change this, you can add text as well as Smart Tags. Just click on Show Smart Tags to see different user and site data you can pull into your notification email’s subject line.

From Name

In most forms, the From Name field will be set by default to a Smart Tag that pulls the Name field from the form entry.

However, if you’re creating a notification to send as a confirmation to the person who filled out the form, you may wish to change this to your company’s name. That way, users won’t receive email notifications that appear to be from themselves, which may be confusing.

From Email

By default, your forms will set the From Email to the Smart Tag.

If there is a different address you would like to use as the sender’s email, you can simply enter it in this field.

Note: If you’re using an SMTP plugin to ensure email delivery, make sure your From Email follows your mailer’s requirements. Some SMTP mailers require your notifications’ From Email to match the email address you used in your SMTP settings. Others require a domain-specific email address.

WP Mail SMTP users can see the From Email requirements for each of our supported mailers in our tutorial on fixing email delivery issues. If you’re using a different SMTP plugin, check its documentation or contact its support team for help finding your mailer’s requirements.

Reply-To Email Address

The email address entered into this field will be used as the recipient of any replies to the notification email that’s sent.

For example, if you’ve set the From Email to your own email address, it may be useful to set the Reply-To Email Address field to a Smart Tag that pulls the user’s email from the entry.

That way, if you have questions about a users’ form, you can simply reply to the notification email to get in touch with them.

Or, if you’re sending a notification email to your users, you could make the reply-to email your own email address so that they easily can reach out to you.

If left empty, the Reply-To Email Address will default to the From Email.

Note: There can only be one Reply-To Email Address. If you’d like to use reply-all functionality to reply to multiple email addresses, be sure to add a CC field.

Email Message

The last step is to set up your notification’s message, or body text. By default, the Email Message field will contain the Smart Tag, which displays all user-entered fields (plus Hidden Fields) and their labels.

If you’d like to customize the notification email’s content further, you can add additional text, Smart Tags, and even add HTML or inline CSS directly into the Email Message field.

In the example below, we’ll use the Smart Tag. This Smart Tag pulls the value that a user has added to or selected from a specific field in your form. In this case, we’ll use to pull the value from our Name field, which has an ID of ‘0’.

Note: For more information on the , check out our tutorial on Smart Tags.

Here is an example of how the email notification might look once it’s received:

Note: If you’d like more details on how to customize your email notifications (including changing the background or link text color), be sure to check out our developer documentation.

Adding Multiple Form Notifications

WPForms makes it easy to create multiple email notifications for a form. Whether you’d like to send out unique emails to different recipients or set up conditional notifications based on users’ entry selections, multiple form notifications are a great way to make your emails feel more personalized.

To add an additional notification email, make sure you’re still on the Settings » Notifications page. Then, click the Add New Notification button.

An overlay will then appear where you can name your new notification. Your users won’t see this name, so it can be anything you like. It’s meant to simply help you keep your notifications organized.

If you decide later that you’d like to rename or delete a notification, you can do that by clicking the appropriate icon to the right of the notification name.

If you’d like to duplicate a notification, click the clipboard icon.

Additionally, you can use the caret (^) to collapse the settings for a notification.

You can configure your new notification following the same steps as above. When you’re finished, click Save to store your changes.

Creating a Reply-All Notification with a CC Field

By default, email notification recipients are not able to use their email provider’s reply-all feature. If you would like to enable recipients to reply to multiple people from your email notifications, you’ll need to use WPForms’ Carbon Copy (CC) email option.

Читайте также:  Не работает датчик отпечатков пальцев samsung а21s

To add a CC field, you first have to navigate to WPForms » Settings and click on the Email tab.

If you scroll to the bottom of this page, you can check the box next to Carbon Copy to enable the CC field.

After saving these settings, return to the form builder. You should see a new CC field in your notifications settings where you can enter additional email addresses.

If you enter multiple email addresses in this field, be sure to separate them with commas.

Note: When using the CC field, please be sure to only include one email in the Send To Email Address field. Otherwise, each additional email address you enter will result in an extra copy of the notification sent to each address in the CC field.

Sending an Email Notification to the Person Who Filled Out the Form

Sending an email to the user who submitted the form is a great way to quickly acknowledge that you’ve received their entry.

To set this up, you need the Send To Email Address to pull the user’s email from their entry. You can do this using a Smart Tag.

In your notifications settings, look to the right of the Send To Email Address field and click Show Smart Tags.

This will open a list of available Smart Tags. Under the Available Fields section, select the Email field.

The appropriate Smart Tag will automatically be added to the Send To Email Address field for you.

When the email notification is sent, this Smart Tag will automatically pull the email address that the user entered into your form.

Note: If you’d like to delay notifications from going to your users until after their payments have been successfully processed, be sure to check out our tutorials on integrating your forms with PayPal, Stripe, and Authorize.Net.

Customizing Your Notifications

There are lots of ways to customize your email notifications, such as including your own branding and content. We’ll outline some of the most popular options below.

Note: The settings in the following section apply to all WPForms notification emails for your site, not just those for an individual form.

Switching to Plain Text Emails

By default, all emails are in HTML format as this allows for styling and images.

If you’d prefer to switch to plain text notifications, you’ll need to go to WPForms » Settings and select the Email tab.

From the Email page, scroll down to Templates and select Plain Text. Then save your settings.

Here’s an example of how a plain text email would look.

Setting an Email Header Image

If you’d like to add a header image or logo to your notification emails, you’ll need to go to WPForms » Settings and open the Email tab.

Scroll to the Header Image section, then click Upload Image to select your header image file.

For the best viewing experience on all screen sizes, we recommend using an image that’s 300 pixels wide and 100 pixels tall, or smaller.

After saving your settings, this image will be added to all future notification emails for your forms.

For more details, check out our tutorial on adding a header image to emails.

Changing Email Background Color

By default, all form emails have a light grey background color.

If you’d like to change this, you can go to WPForms » Settings and open the Email tab. Here, you’ll see an option labeled Background Color. You can click on this field to open the color picker and select a background color, or enter any HEX value.

Remember to save any changes to your settings before leaving this page.

Testing Notification Emails

Once your notifications settings are configured, we recommend trying them out. Testing your forms is super useful because it allows you to share in the user experience. It also provides an opportunity to make sure everything looks and works exactly as you’d like.

For all the details on testing notification emails, as well as other aspects of your forms, please check out our pre-launch checklist and form testing tutorial.

Frequently Asked Questions

Here, we’ll discuss some of the most common questions we receive about email notifications in WPForms.

Why am I not receiving my notification emails?

If you’re not receiving notification emails, first be sure that all of your notifications settings are configured correctly.

If your settings look correct, the issue is likely because emails sent from WordPress are not authenticated by default, unlike emails sent from dedicated email service providers. As a result, they are often filtered out by the receiving mail server and not delivered.

To resolve email delivery issues like this, you can configure an SMTP plugin on your site so that emails are sent as authenticated.

Can I configure my notifications to send only if certain conditions are met?

Absolutely! With any paid license, you can set up conditional notifications for your forms. For more details on how to do this, be sure to check out our guide on how to create conditional form notifications.

That’s it! Now you can set up and customize notification emails for all of your forms.

Would you also like to see some examples of custom notification emails? Be sure to check out our blog posts on out-of-office email template ideas and personalized email examples.

Источник

Оцените статью