How to configure SMTP email on Cloudways
Quick Answer
Prerequisites
- Active Cloudways account with server admin permissions
- SMTP credentials from provider (SendGrid, Mailgun, Amazon SES)
- WordPress admin access if configuring for WordPress
- SSH access to server enabled in Cloudways dashboard
- WP Mail SMTP or similar plugin installed
Log in to Cloudways Dashboard
Navigate to your Cloudways account and sign in. From the top menu, select your Server (not an individual application). This ensures you're configuring SMTP at the server level, which applies to all applications on that server.
Navigate to SMTP Settings
In the server details page, locate the left sidebar and scroll to the Server Management section. Click on SMTP, which is listed alongside other server-level settings like Monitoring and Cron Jobs.
Select Your SMTP Provider
From the dropdown menu, choose your SMTP provider. Cloudways offers pre-configured options including SendGrid, Mailgun, Amazon SES, and SMTP Generic for custom providers. Select the provider that matches your email service account.
Enter SMTP Credentials
Input your SMTP credentials in the provided fields. For SendGrid, use smtp.sendgrid.net as the host, 587 as the port, apikey as the username, and your SendGrid API key as the password. Set encryption to TLS. For other providers, consult their documentation for the correct host, port, and authentication method. Specify a From Email address (e.g., noreply@yourdomain.com) that will appear as the sender.
Test SMTP Configuration
Click the Test SMTP Configuration button. Enter a test recipient email address and send a test message. Cloudways will confirm whether the server-side SMTP connection works. A successful test indicates your credentials and provider settings are correct at the server level.
Save Changes
Click Save Changes to apply the SMTP configuration server-wide. You may need to restart PHP-FPM for changes to take effect. Navigate to Server > Settings & Packages > PHP-FPM Restart and click restart.
Install WP Mail SMTP Plugin
Log in to your WordPress admin dashboard. Go to Plugins > Add New and search for WP Mail SMTP. Install and activate the plugin. This plugin overrides WordPress's default wp_mail() function to use SMTP instead of PHP mail().
Configure WP Mail SMTP Plugin
In the WordPress admin, navigate to WP Mail SMTP > Settings. Under the Mailer section, select Other SMTP. Enter the same SMTP credentials you configured in Cloudways: host, port, username, password, and encryption type. Enable Force SMTP to ensure WordPress uses SMTP instead of PHP mail().
Test Email from WordPress
In the WP Mail SMTP settings, locate the Test Email section. Enter a test recipient email address and click Send Test Email. If successful, WordPress is now sending emails via your configured SMTP provider. Check the recipient's inbox (including spam folder) to confirm delivery.
Verify Email Delivery and Monitor
Send a test user invitation or password reset from WordPress to confirm emails are being delivered. Monitor your SMTP provider's dashboard (e.g., SendGrid's activity log) to track sent emails and identify any delivery issues. Set up email logs in WP Mail SMTP to track all outgoing messages from WordPress.
Troubleshooting
WordPress emails not sending despite successful Cloudways SMTP test
Authentication error or 'Invalid credentials' message
Emails sent but not received or going to spam
Connection timeout or port blocked error
telnet smtp.sendgrid.net 587 to confirm the port is accessible.PHP-FPM needs restart after SMTP configuration changes
Ready to get started with Cloudways?
Put this tutorial into practice. Visit Cloudways and follow the steps above.
Visit Cloudways →