You can use SMTP services using an SMTP plugin in WordPress to send emails, instead of the usual PHP mail() function. This guide will help you set up the WP SMTP Mail plugin even with the free version, a great choice for sending emails from your WordPress site.
Step 1: Download and activate the SMTP plugin.
- Go to dashboard > Plugins > Add New Plugin
- Search for “WP Mail SMTP” by WPForms and click on “Install now“
- After that click on “Activate“
Step 2: Configure settings
Visit the plugin’s Settings page, navigate to the Mail section, and configure the following settings:
1. From Email: Specify the email address you wish to use for sending all emails.
Please be aware that email addresses from external providers won’t function. It is necessary to input an email address that belongs to your domain.
-> Force from email: Make sure to tick this box to prevent the use of any other email addresses in emails, which could result in the email not being sent.
2. From name: You can enter the name you want in this field, and it will appear to your recipients.
-> Force from name: It is optional to use this option.
3. Set the return path to match the From Email: This is also optional.
4. Mailer: Here, please select the option “Other SMTP“.
Step 3 – Configure settings for “Other SMTP”
5. SMTP Host: Enter this email address: smtp. gmail.com.
6. Encryption: Select TSL, the usual encryption method employed by your mail server for sending emails.
7. SMTP Port: The port utilized by the outgoing mail server.
8. Authentication: This setting should be on.
10. SMTP Username: Normally, the email address that you are using to send emails.
11. SMTP Password: The password you’ve assigned to the email address from which the email is sent.
After configuring, please click to Save Settings.
Step 4: Send a test email
- Navigate to the WP Mail SMTP setting > Tools >Email Test
- Send to: For the recipient, enter an email address to send a testing email
- Then click on the Send Email button, and check your mailbox
- If the email is sent successfully, the message will appear: The test email might have been sent, but its deliverability should be improved. However, if it is not sent, or an error appears, this notification will be visible: There was a problem while sending the test email. There may be some reasons for this issue:
- The recipient’s email address is invalid.
- The password for your email account is incorrect.
- The SMTP server address was not configured correctly. Please revisit Step 2 and confirm.
- Go to your mailbox and confirm its arrivals