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:
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.
"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:
In the left menu, click on Plugins > Add new and in the search field enter "wp mail smtp":
Now that we have installed the plugin in charge of sending emails, we proceed with its configuration:
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:
!(https://static.swpanel.com/doc/2022/images/0118/0118_04_EN.png) - **Encryption:** None. - **SMTP port:** 25. - **Automatic TLS:** Active. - **Identification:** Active. - **SMTP user name:** Email account address. - **SMTP password:** Password of the mail account.
Once configured, let's check the correct operation, generating a test email:
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!