SMTP Mailer is the easiest SMTP plugin for WordPress. It allows you to configure an SMTP server to send email from your website. SMTP Mailer enhances the default WordPress mail (“wp_mail”) function by letting you connect to a remote SMPT server to send an email instead of doing it from your web server. This reduces heavy load from your server and increases email deliverability.
SMTP Mailer Installation
You can install the SMTP plugin like any other WordPress plugin.
Option 1 (Quick & Easy install)
- Go to Plugins->Add New from your WordPress admin dashboard
- Search for SMTP Mailer
- Click Install once you have found it
Option 2 (Manual install)
- Download the zip version of the plugin
- Go to Plugins->Add New
- Click Upload Plugin
- Select the zip file on your computer
- Install it
Option 3 (FTP install)
- Download the zip version of the plugin
- Extract it on your computer
- Connect to your site via FTP
- Browse to “/wp-content/uploads/plugins/” directory
- Upload the folder that contains the main plugin files
SMTP Mailer Settings
You will need to configure your SMTP server related information in order to send email from your website. In order to access the settings menu go to “Settings->SMTP Mailer” from your admin dashboard.
The settings menu comes with three separate tabs – General Settings, Test Email & Server Info.
General Settings
SMTP Host
Your outgoing mail server which will be used for sending email (e.g. smtp.gmail.com).
SMTP Authentication
Enable/Disable SMTP authentication when sending an email (Supported values: True/False).
SMTP Username
The username to connect to your SMTP server. You will need to provide a username if you enable “SMTP Authentication”.
SMTP Password
The password to connect to your SMTP server. You will need to provide a password if you enable “SMTP Authentication”.
Type of Encryption
The encryption which will be used for sending an email (Supported values: TLS/SSL/No Encryption. TLS is recommended).
SMTP Port
The port which will be used when sending an email (587/465/25). If you choose TLS the port should be set to 587. For SSL use port 465 instead.
From Email Address
The email address which is be used as the From Address if it is not supplied to the mail function.
From Name
The name which will be used as the From Name if it is not supplied to the mail function.
Test Email
“Test Email” menu allows you to test the functionality of the plugin after you have configured everything.
Server Info
“Server Info” menu displays some technical information regarding your server. This is very useful for troubleshooting.
Outgoing Mail Server Configurations
Here are the settings for all the popular outgoing mail (SMTP) servers.
Bluehost SMTP
For a domain name example.com, We were able to send email messages from Bluehost using the following configurations:
- SMTP Host: mail.example.com
- SMTP Authentication: True
- SMTP Username: Your domain email (e.g. support@example.com)
- SMTP Password: The password that you use to access this email account
- Type of Encryption: SSL
- SMTP Port: 465
Brevo SMTP (formerly Sendinblue)
- SMTP Host: smtp-relay.sendinblue.com
- SMTP Authentication: True
- SMTP Username: Your login email (can found be under SMTP & API > SMTP menu)
- SMTP Password: Your smtp master password (can found be under SMTP & API > SMTP menu)
- Type of Encryption: TLS
- SMTP Port: 587
Gmail SMTP
In order to connect to the Gmail smtp server with a username and password, the “allow less secure apps” option needs to be enabled in your Gmail account. Unfortunately this option is no longer available. If you wish to use Gmail SMTP you may want to take a look at my Gmail SMTP plugin which uses a different authentication method.
SMTP Mailer Add-ons
SMTP Mailer plugin comes with add-ons that you can use to enhance its functionality on your website.
Reply-To
Reply-To add-on lets you set a reply-to address for all outgoing email messages.
Email Logger
Email Logger add-on lets you log and view all email messages sent by SMTP Mailer.
SMTP Mailer Premium Support
Note:
* We have no control over your server, theme or the plugins installed. That is why we cannot guarantee that the issues will be resolved.
* Do not try to scam us, we take it seriously. We are contributing to the WordPress community with free plugins and themes. If you cannot appreciate this our product is not the right choice for you.
* There is no refund/cancellation as it is a service.
Hi, Does this plugin support Mandrill?
@Robert, SMTP Mailer does support Mandrill. I have just added instructions for integrating with Mandrill SMTP.
Hi I am using the Gmail SMTP plugin and i am receiving an error on Missing Extension openssl.
Can you help me fix it please.
@Robb, You can’t use encryption without openssl. Which plugin are you using now (Gmail SMTP or SMTP Mailer)?
I am using Gmail SMTP. Can you help me fix the openssl? I am using a free hosting.
@Robb, I can’t really help you with it. This is an extension that needs to be installed on the server.
Hi admin.
Using smtp-mailer, have an issue:
Fatal error: Cannot redeclare class phpmailerException in /home/ppsotoas/public_html/wp-includes/class-phpmailer.php on line 3828
Any idea?
@pepesoto, This plugin requires PHP 5.4 or later in order to send email (PHP version on your server is 5.3.29).
I’ve tried using both Gmail plugin and SMTP-Mailer that you’ve created, and I have also tried several different accounts. I am using Google Apps accounts, and have had it work previously, even fixed security settings on account to “allow” the smtp access…. what am I missing?
Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ()
SMTP ERROR: Failed to connect to server: Connection refused (111)
SMTP connect() failed. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
OS: Linux a2plcpnl0595.prod.iad2.secureserver.net 2.6.32-604.30.3.lve1.3.63.el6.x86_64 #1 SMP Sun Sep 27 06:34:10 EDT 2015 x86_64
PHP version: 5.4.45
WordPress version: 4.4.2
WordPress multisite: Yes
openssl: Available
allow_url_fopen: Enabled
stream_socket_client: Available
fsockopen: Available
@Chris, Which hosting are you using? Have you followed the tutorial on wpbeginner (please see the link above)?
Connection: opening to smtp-mail.outlook.com:587, timeout=300, options=array ()
Connection: Failed to connect to server. Error number 2. “Error notice: stream_socket_client(): unable to connect to smtp-mail.outlook.com:587 (Connection refused)
SMTP ERROR: Failed to connect to server: Connection refused (111)
SMTP connect() failed. github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
any ideas why this is happening???
@Jessica, Please check the troubleshooting section.
Yeah. I went thru tutorial for both plugins… it’s GoDaddy who hosts my sites, and Google Apps for my email system.
@Chris, GoDaddy might be the issue here. Can you please contact them to see if they allow external SMTP configuration?
Chris I get the same problem with godaddy. Did you manage to solve it? I’m stuck.
@james, GoDaddy only allows their own SMTP. You can contact them to get their SMTP info.
I keep getting a whole bunch of error code lines but the last 7 are:
SMTP Error: Could not authenticate.
CLIENT -> SERVER: QUIT
SMTP -> get_lines(): $data is ""
SMTP -> get_lines(): $str is "221 2.0.0 closing connection e20sm14124497oic.19 - gsmtp"
SERVER -> CLIENT: 221 2.0.0 closing connection e20sm14124497oic.19 - gsmtp
Connection: closed
SMTP Error: Could not authenticate.
I’ve tried changing the option to allow for less secure apps but this didn’t make a difference. Can not receive any test emails
@Richard, Have you logged into your Gmail account after this? You might see a security warning in your account upon login. As soon as you confirm that it was you who tried to login, the plugin should be able to connect to the Gmail SMTP server.
What port combination did you use? Please copy and paste the content from the “Server Info” tab so I can take a look.
I did get that message. I will email them and let them know – thanks.
@Richard, No, You just click on the link (shown in the message) to unblock it.
I am having the same issue on Weblayer host, cannot log in to Gmail account, we had the same issue on our rudby on rails application (could not connect at the same time as Wpress) and we resolved just including including the line :domain => ‘»your domain«’, … follows the coding for Rugby-on-rails and it works! can somebody try it for Wpress and give a fedback? I am not programmer just somebody that is f&ck up
config.action_mailer.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
:domain => ' xxxx.com',
:user_name => "xyz@gmail.com",
:password => "password",
:authentication => :plain,
:enable_starttls_auto => true
}
Hello,,team
Appear warning like these,,all ssl port and option has tested…still…wordpress 4.5
SMTP Error: Could not authenticate.
CLIENT -> SERVER: QUIT
SMTP -> get_lines(): $data is ""
SMTP -> get_lines(): $str is "221 2.0.0 closing connection tn5sm80142858pac.32 - gsmtp"
SERVER -> CLIENT: 221 2.0.0 closing connection tn5sm80142858pac.32 - gsmtp
Connection: closed
SMTP Error: Could not authenticate
Would you like explain me how?
regard,,
@yudi, I have added some troubleshooting steps in the “Gmail” section. Please give it a try and let me know how it goes.
I am trying to run the tests from the “Test Email” tab and I am only getting this message:
Connection: opening to smtp.myurl.com:25, timeout=300, options=array (), where myurl is the same domain the wordpress site sits on.
How can I determine what the problem is from this message? There is no response information being presented.
@Tony, Who is your hosting provider? Did you get this SMTP info from your web host?
@Admin
We are using RackSpace to host our exchange server.
One World Hosting is the hosting provider.
@Tony, I’m not really familiar with this host. Do you have instructions as to how you can configure SMTP on their server?
I’m trying with Yahoo. I’m getting this message “There was an error trying to send your message. Please try again later.”. Could you please help with this?
@Vicky, What port combinations did you try? Please provide the content from the “Server Info” tab so I can take a look.
Great plugin and looks exactly like what I am looking for.
After configuring the plugin I can send the test E-mail successfully (I’m using mailgun.org as SMTP server). However, I get neither new comments nor user registration notifications (or any other E-mails) although the notifications are enabled in the settings of my wordpress. It seems like the wordpress simply doesn’t use this plugin when attempts to send E-mails. Do you have an idea what I am doing wrong?
Here is my server info:
OS: Linux 846098f38250 3.13.0-74-generic #118-Ubuntu SMP Thu Dec 17 22:52:10 UTC 2015 x86_64
PHP version: 5.6.21
WordPress version: 4.5.2
WordPress multisite: No
openssl: Available
allow_url_fopen: Enabled
stream_socket_client: Available
fsockopen: Available
@Alex, Have you tried the test email functionality? WordPress uses the
wp_mail
function to send email. As long as that functon is getting called the plugin should be able to override the default configurations with SMTP.If you mean the test E-mail functionality provided by the plugin – then yes, I’ve tried it and it works, I also receive the test E-mail. I’ve tested several other plugins and couldn’t get them to work, even the test E-mail functionality wouldn’t work.
The only plugin that works for me is Easy WP SMTP, but I am getting HTTP timeouts on POST requests with it (e.g., comments) because the plugin is taking too long to send an E-mail and the HTTP handler wouldn’t return until that operation is finished, so I had to deactivate it.
I was trying to find a way to debug wordpress to see why the smtp-mailer-plugin can’t deliver E-mails (while test E-mail works!), but couldn’t find a simple way to do that (I’m not very familiar with php). I’m using nginx with fastcgi and have php-fpm log set to ‘warning’ – no errors from smtp-mailer-plugin in there when I’m e.g. posting a comment.
Could you maybe give me a hint on a way to debug the wordpress/plugin?
@Alex, If the test email works that means there is nothing wrong with your setup. Test email also uses the
wp_mail
function to send email. Are you using any CDN like cloudflare? Is your website hosted on a cloud server? Some users were having a similar issue with my Gmail SMTP plugin.https://wordpress.org/support/topic/test-email-timeout
My wordpress is running in a Docker container on Amazon AWS. I don’t think I have the timeout issue, the Test E-mail is sent very fast, within 1 second. I still suspect there is something wrong with my WP configuration like it tries to use system mail instead of wp_mail, although from you say I understand it’s not possible.
If it even makes sense, is there a way to make wordpress send me an E-mail other than creating a comment or adding a new user (other than the Test Mail of the plugin)? I have several other plugins, but I don’t see where there could be a collision with smtp-mailer.
@Alex, I don’t think there is an email functionality in the WordPress admin. Do you want to contact Amazon AWS to see if they have any restrictions on outgoing email? It seems to only happen on the front end.
I’ve just discovered that the E-mail notification on user profile update (change of password) works. However, the E-mail notification on a new comment still doesn’t. I believe this rules out the hosting or smtp-mailer configuration problem. What else could it be then?
Double checked the Settings -> Discussion -> Email me whenever … Anyone posts a comment: it’s enabled. Any idea?
OS: Linux a2plcpnl0035.prod.iad2.secureserver.net 2.6.32-604.30.3.lve1.3.63.el6.x86_64 #1 SMP Sun Sep 27 06:34:10 EDT 2015 x86_64
PHP version: 5.4.43
WordPress version: 4.5.2
WordPress multisite: No
openssl: Available
allow_url_fopen: Enabled
stream_socket_client: Available
fsockopen: Available
I use ARfroms WordPress pro From plugin. When i submitted the form , submit successfully but i can’t get any email from the site.
I use SMTP plugin for phpmail …it work’s for me. but when i’ll try to use your plugin i got this message :
Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ()
SMTP ERROR: Failed to connect to server: Connection refused (111)
SMTP connect() failed.
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
Can you please give me solution.. thanks
@Sabbir, Please check the troubleshooting section. Make sure to keep only one SMTP plugin active.
I just try to send this here again, to see the error message. I already got a reply via e-mail!
Seems like a great plugin. I just need to make sure I’m setting it up correctly: Is everything I need to do to install it and enter my SMTP details? Or do I also need to tell WordPress in some way to use this plugin instead of the built in way? (It’s a little confusing with the info “Configure the wp_mail() function to use SMTP instead of the PHP mail() function.” because it can be understood as that I as a user need to configure something in WordPress.
And how do I know that the plugin is used rather than the built in way? When I check the source of two e-mails, they look similar to me. They both refer to PHPMailer as the X-Mailer (even in the test e-mail).
im also having difficulty setting up my email that comes in through a contact form. i can only see my messages if i access them through messages in the dashboard. I downloaded this plugin set up the host server information but i still dont get the messages sent over to my phone/computer email,
any advice would be grateful.
@mark, Did you send a test email to check if the plugin works on your site? How did you configure the plugin settings? Please copy and paste content from the “Server Info” tab so I can take a look.
Thank you for coming back to me.
I have it sorted. Turns out there was a bug in the developers theme, they have rectified it now.
I am trying to get contact forms to work on a client site and am scratching my head, because the emails do not arrive. Site hosted at A2, email at GSuite.
Applying your recommended settings for gmail, I alsways get a “could not authenticate” and “535 Incorrect authentication data” message, no matter which encryption method/port combination I use. Username/password checked x times…
Connection: opening to ssl://smtp.gmail.com:465, timeout=300, options=array ()
Connection: opened
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “220-ssr7.supercp.com ESMTP Exim 4.87 #1 Wed, 22 Feb 2017 14:55:10 -0500 ”
SMTP -> get_lines(): $data is “220-ssr7.supercp.com ESMTP Exim 4.87 #1 Wed, 22 Feb 2017 14:55:10 -0500 ”
SMTP -> get_lines(): $str is “220-We do not authorize the use of this system to transport unsolicited, ”
SMTP -> get_lines(): $data is “220-ssr7.supercp.com ESMTP Exim 4.87 #1 Wed, 22 Feb 2017 14:55:10 -0500 220-We do not authorize the use of this system to transport unsolicited, ”
SMTP -> get_lines(): $str is “220 and/or bulk e-mail.”
SERVER -> CLIENT: 220-ssr7.supercp.com ESMTP Exim 4.87 #1 Wed, 22 Feb 2017 14:55:10 -0500 220-We do not authorize the use of this system to transport unsolicited, 220 and/or bulk e-mail.
CLIENT -> SERVER: EHLO familytherapysedona.com
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “250-ssr7.supercp.com Hello ssr7.supercp.com [75.98.175.93]”
SMTP -> get_lines(): $data is “250-ssr7.supercp.com Hello ssr7.supercp.com [75.98.175.93]”
SMTP -> get_lines(): $str is “250-SIZE 52428800”
SMTP -> get_lines(): $data is “250-ssr7.supercp.com Hello ssr7.supercp.com [75.98.175.93]250-SIZE 52428800”
SMTP -> get_lines(): $str is “250-8BITMIME”
SMTP -> get_lines(): $data is “250-ssr7.supercp.com Hello ssr7.supercp.com [75.98.175.93]250-SIZE 52428800250-8BITMIME”
SMTP -> get_lines(): $str is “250-PIPELINING”
SMTP -> get_lines(): $data is “250-ssr7.supercp.com Hello ssr7.supercp.com [75.98.175.93]250-SIZE 52428800250-8BITMIME250-PIPELINING”
SMTP -> get_lines(): $str is “250-AUTH PLAIN LOGIN”
SMTP -> get_lines(): $data is “250-ssr7.supercp.com Hello ssr7.supercp.com [75.98.175.93]250-SIZE 52428800250-8BITMIME250-PIPELINING250-AUTH PLAIN LOGIN”
SMTP -> get_lines(): $str is “250 HELP”
SERVER -> CLIENT: 250-ssr7.supercp.com Hello ssr7.supercp.com [75.98.175.93]250-SIZE 52428800250-8BITMIME250-PIPELINING250-AUTH PLAIN LOGIN250 HELP
Auth method requested: UNKNOWN
Auth methods available on the server: PLAIN,LOGIN
Auth method selected: LOGIN
CLIENT -> SERVER: AUTH LOGIN
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “334 VXNlcm5hbWU6”
SERVER -> CLIENT: 334 VXNlcm5hbWU6
CLIENT -> SERVER: ZWxpc2F0aG9tYXM=
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “334 UGFzc3dvcmQ6”
SERVER -> CLIENT: 334 UGFzc3dvcmQ6
CLIENT -> SERVER: RWxpc2F3b3JrZG9tYWluNw==
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “535 Incorrect authentication data”
SERVER -> CLIENT: 535 Incorrect authentication data
SMTP ERROR: Password command failed: 535 Incorrect authentication data
SMTP Error: Could not authenticate.
CLIENT -> SERVER: QUIT
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “221 ssr7.supercp.com closing connection”
SERVER -> CLIENT: 221 ssr7.supercp.com closing connection
Connection: closed
SMTP Error: Could not authenticate.
Thanks for any help
@Musepuckl, The error doesn’t make sense. Did you try TLS encryption on port 587?
SMTP connect() failed.
https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting
help me
after installing smtp mailer, because the google one does not work with godaddy hosting, I followed the directions from here
https://wordpress.org/support/topic/fixed-my-problem-with-godaddy-not-e-mailing-gravity-forms/
and go this error.Connection: opening to relay-hosting.secureserver.net:25, timeout=300, options=array ( ‘ssl’ => array ( ‘verify_peer’ => false, ‘verify_peer_name’ => false, ‘allow_self_signed’ => true, ),)
Connection: opened
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “220 a2nlsmtp01-05.prod.iad2.secureserver.net : HOSTING RELAY : ESMTP Grid hosting relay server ready”
SERVER -> CLIENT: 220 a2nlsmtp01-05.prod.iad2.secureserver.net : HOSTING RELAY : ESMTP Grid hosting relay server ready
CLIENT -> SERVER: EHLO incomeautopilot.org
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “250-a2nlsmtp01-05.prod.iad2.secureserver.net hello [198.71.243.9], pleased to meet you”
SMTP -> get_lines(): $data is “250-a2nlsmtp01-05.prod.iad2.secureserver.net hello [198.71.243.9], pleased to meet you”
SMTP -> get_lines(): $str is “250-HELP”
SMTP -> get_lines(): $data is “250-a2nlsmtp01-05.prod.iad2.secureserver.net hello [198.71.243.9], pleased to meet you250-HELP”
SMTP -> get_lines(): $str is “250-SIZE 30000000”
SMTP -> get_lines(): $data is “250-a2nlsmtp01-05.prod.iad2.secureserver.net hello [198.71.243.9], pleased to meet you250-HELP250-SIZE 30000000”
SMTP -> get_lines(): $str is “250-ENHANCEDSTATUSCODES”
SMTP -> get_lines(): $data is “250-a2nlsmtp01-05.prod.iad2.secureserver.net hello [198.71.243.9], pleased to meet you250-HELP250-SIZE 30000000250-ENHANCEDSTATUSCODES”
SMTP -> get_lines(): $str is “250-8BITMIME”
SMTP -> get_lines(): $data is “250-a2nlsmtp01-05.prod.iad2.secureserver.net hello [198.71.243.9], pleased to meet you250-HELP250-SIZE 30000000250-ENHANCEDSTATUSCODES250-8BITMIME”
SMTP -> get_lines(): $str is “250 OK”
SERVER -> CLIENT: 250-a2nlsmtp01-05.prod.iad2.secureserver.net hello [198.71.243.9], pleased to meet you250-HELP250-SIZE 30000000250-ENHANCEDSTATUSCODES250-8BITMIME250 OK
CLIENT -> SERVER: MAIL FROM:
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “250 2.1.0 sender ok”
SERVER -> CLIENT: 250 2.1.0 sender ok
CLIENT -> SERVER: RCPT TO:
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “250 2.1.5 recipient ok”
SERVER -> CLIENT: 250 2.1.5 recipient ok
CLIENT -> SERVER: DATA
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “354 OK”
SERVER -> CLIENT: 354 OK
CLIENT -> SERVER: Date: Sat, 8 Apr 2017 14:46:49 +0000
CLIENT -> SERVER: To:
brandon@incomeautopilot.org
CLIENT -> SERVER: From: Brandon Boyd
CLIENT -> SERVER: Subject: Test Email
CLIENT -> SERVER: Message-ID:
CLIENT -> SERVER: X-Mailer: PHPMailer 5.2.22 (
https://github.com/PHPMailer/PHPMailer
)CLIENT -> SERVER: MIME-Version: 1.0
CLIENT -> SERVER: Content-Type: text/plain; charset=UTF-8
CLIENT -> SERVER:
CLIENT -> SERVER: test
CLIENT -> SERVER:
CLIENT -> SERVER: .
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “250 2.0.0 wrdZc5RIoCQzGwrdZcn8mv mail accepted for delivery”
SERVER -> CLIENT: 250 2.0.0 wrdZc5RIoCQzGwrdZcn8mv mail accepted for delivery
CLIENT -> SERVER: QUIT
SMTP -> get_lines(): $data is “”
SMTP -> get_lines(): $str is “221 2.0.0 a2nlsmtp01-05.prod.iad2.secureserver.net : HOSTING RELAY : closing connection”
SERVER -> CLIENT: 221 2.0.0 a2nlsmtp01-05.prod.iad2.secureserver.net : HOSTING RELAY : closing connection
Connection: closed