Configure SMTP for outbound emails
- Google Cloud Platform doesn’t allow SMTP traffic through default ports: 25, 465, 587. Check Google cloud documentation to learn how to use a VPN to bypass these restrictions or use a different port for sending emails from your application.
You can install or enable the “WP Mail SMTP” plugin from the WordPress administration page. Follow these steps to activate this plugin.
- Log in to the WordPress administration panel.
Navigate to “Plugins” and click the “Activate” option for the “WP-Mail-SMTP” plugin.
Go to the “Settings -> WP Mail SMTP” panel and the “Settings” tab to configure the SMTP settings of your email provider. Select “Other SMTP” as the mailer.
Here is an example of configuring WordPress to use a Gmail account. Replace USERNAME and PASSWORD with your Gmail account username and password respectively.
- SMTP Host: smtp.gmail.com
- SMTP Port: 587
- Encryption: Use TLS encryption.
- Authentication: On
- SMTP Username: USERNAME@gmail.com
SMTP Password: PASSWORD
If you are using a different provider, remember to replace these values with the valid data for your SMTP provider.
Click “Save Settings” to save the changes.
Send a test email using the “Email Test” tab to ensure that everything is working smoothly.
To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid or Mandrill, refer to the FAQ.
NOTE: If you are using Gmail as the outbound email server and have experienced issues trying to send emails correctly, check the Gmail SMTP troubleshooting page to learn the causes of these issues and how to solve them.