· Tutorial ·

Configure plugin for sending mail (WP Mail SMTP) in WordPress

It is possible that one of the needs of your WordPress site is to send email, using the "wp_mail()" function. Among others, it is usually used for sending:

  • Contact forms
  • Confirmation messages (registrations, orders...).
  • Notifications to customers.

We explain how to incorporate in WordPress the ability to connect to SMTP mail servers to send your emails. To do this we will use the plugin "WP Mail SMTP" as it is one of the simplest and most common.

Install plugin "WP Mail SMTP" in WordPress

"WP Mail SMTP", is one of the most common plugins in WordPress for sending emails. Let's proceed with the installation:

  • Access the Wordpress administration panel. It is usually located in the "wp-admin" directory, for example:

    • https://www.tudominio.com/wp-admin
  • In the left menu, click on Plugins > Add new and in the search field enter "wp mail smtp":

  • Click on the Install Now button of the plugin WP Mail SMTP by WPForms and once installed, click on the Activate button that appears in the same place.

Now that we have installed the plugin in charge of sending emails, we proceed with its configuration:

  • Access Settings > WP Mail SMTP:

  • We fill in the following fields:
    • Sender's email: The email address that will appear as the sender in WordPress mailings.

    • Sender's name: The name that will appear as the sender in WordPress mailings.

    • Email Service: In this example, let's assume that you want to configure the mail server you use in SW Hosting, select "Other SMTP". You can also choose to use a public server such as "Gmail".

-- We fill in the following fields: - SMTP Server: Address of the mail server. You can check this information in SWPanel, accessing your service and clicking on Servers of the service:


- **Encryption:** None.

- **SMTP port:** 25.

- **Automatic TLS:** Active.

- **Identification:** Active.

- **SMTP user name:** Email account address.

- **SMTP password:** Password of the mail account.
  • Press Save settings to confirm the changes.

Generate test email

Once configured, let's check the correct operation, generating a test email:

  • Access the Test Mail tab.
  • Enter the email address to which the test email will be sent.
  • Click Send mail.

If the sending fails, check the settings entered.

If all goes well, it appears:

You will receive an email like the following:

You have already configured the sending of mail in WordPress!