This WordPress plugin reconfigures the wp_mail() function so all mail from your blog can be sent by SMTP instead of using PHP’s mail() function. The plugin also adds an Options > Email page which allows you to configure the settings from the admin interface of your site.
Download the plugin from wordpress.org.
Troubleshooting
Could not connect to host
If you see an error like “Failed to connect to server”, the plugin is working, PHP cannot connect to the server. Look at the whole error message and investigate from there. Check your php.ini settings around fopen() permissions, check your SMTP host is correct, or contact your server administrator.
If your error is “Cannot connect to host”, please look for support elsewhere, please do not ask for support here. These questions have been asked many times before, please search the history. The plugin is working, the issue lies elsewhere.
Gmail / Google Apps
To send email via Gmail or Google Apps, use these settings:
Mailer: SMTP
SMTP Host: smtp.gmail.com
SMTP Port: 465
Encryption: SSL
Authentication: Yes
Username: your full gmail address
Password: your mail password
No email from plugins?
If you’re using plugins to send email, these plugins will ignore the SMTP settings if they call PHP’s mail() function directly. If you see the function mail() and not wp_mail() in the plugin’s source, that’s the problem. You should be able to simply add wp_ in front of the existing mail command and it will probably work! (Insert lawyer-speak no warranty blurb here!)
Translatiion
If you would like to translate this plugin, you can download the POT file here.
Other Problems
Try sending a test email. The error message should help you detect your problem.
Multi Site
This plugin was compatible with WordPressMU back in the day. I recommend if using the plugin on a multi-site setup, put your settings in wp-config.php and then disable the admin menu. This means you can set options once that will apply to all sites in your network. Allowing each site to set their own options is also possible, but might lead to unexpected results, and potentially, many more support requests.
Changelog
See the changelog on wordpress.org.
Pingback: Weblog Tools Collection » Blog Archive » WordPress Plugin Releases for 8/31
Pingback: Nico Nemil | Filipino Web Developer | Pinoy Web Designer | Intermediate Graphics Artist » WordPress Plugin Releases for 8/31
Oops… Something is wrong with the file!
@s1mone: Woops, you’re dead right. I’ve updated the link, now it should download ok. Thanks for pointing that out.
Hi there,
Just the mod I’m looking for..
What port have you used for SSL authenticated mail ?
Trying to use it with gmail on smtp port 465
@Dorian: I haven’t configured it to use SSL authenticated mail, although that does seem like a sensible option. I’ll look into adding those options.
Hello,
This is the message I get when I hit the update button, no matter what the selection:
“Cannot load wp_mail_smtp2Fwp_mail_smtp.php.”
Please advise.
@NetGirl: You get that message when you click “Update Options” right? That’s an error because of the way your data is submitted to WordPress. It could be a server or browser issue, but if your other options pages all work, I’m not sure what’s causing it. Can you give me a couple of screenshots? Are you running on Windows / Linux hosting? Anything else you think might be relevant?
I was hoping this would solve my problem, but no dice. I tried it with authentication and without and got nada.
Sorry, meant to add that I’m using WP 2.2.1
@lynn: Can you give me a bit more info as to the problem? Are you seeing any error messages?
Pingback: בעיות הדוא"ל נפתרו : הבלוג של אח"י דקר
All:
Callum is da man. He totally figured out what the problem was and then even helped me with another mail plugin that was having problems.
Awesomely awesome and many thanks,
lynn
Pingback: WordPress Plugins Database » Plugin Details » WP-Mail-SMTP
Pingback: Only Developers . com » Blog Archive » Weblog Tools Collection: WordPress Plugin Releases for 8/31
Cannot load wp_mail_smtp2Fwp_mail_smtp.php
Could you share the solution with the rest of us?
Getting the same error
IIs 6.0 / Windows 2003
PHP 5
Cannot load wp_mail_smtp2Fwp_mail_smtp.php
@Draft, TopCat & NetGirl: I believe the problem was fixed in version 0.3.2. It was a bug to do with forward slashes on *nix and back slashes on Windows. Let me know if you have the same problem with 0.3.2 or later.
Sorry for the slow response.
Yes, it still produces the same error on Windows Server:
Running Ver. 0.3.2.
Cannot load wp-mail-smtp2Fwp_mail_smtp.php.
I also get that error on version 0.3.2 with WP 2.2.3.
=====
Cannot load wp-mail-smtp2Fwp_mail_smtp.php.
=====
It appears on IE7 and FireFox. Server is located on ovh.org but I am not sute what is the platform. I suppose that some linux distribution.
The same error appeared on my own ubuntu-debian server.
Mentioned error message appears but system sends emails correctly
The error message cannot find “wp-mail-smtp2Fwp_mail_smtp.php” is a redirection bug in WordPress. It’s something in WordPress core.
It should only appear when you click “Update Options”. The options are updated and saved, but the error message appears instead of being redirected to the correct page.
Until the bug is fixed in WordPress core, users will have to put up with the problem I’m afraid. It’s purely cosmetic, the plugin still functions as it should do. Hopefully we’ll fix it in WordPress core soon.
Hi there,
I have read all of these comments and I can not seem to match them up with my issue. When I set the plugin to utilize SMTP, I get no emails whatsoever. I have tested it a variety of different ways:
With From email, Empty From email, mail server named address, mail server IP address, with Auth, without Auth. And all combinations of the above. Nothing seems to work. I’m not sure where to look for errors but I noticed that there is NO attempt to login by the username I specified. Essentially, mail just stops working when I turn on SMTP. Any thoughts?
PS – thank you for donating this plugin. It is very useful (or will be).
0.3.2 seems to be working well with me on WP 2.3, including SMTP AUTH. But my host would like me to use TLS for added security. Would that be an easy thing to add, as a new feature? I suppose that depends whether PHPMailer supports TLS, and I can’t see any sign that it does.
@Peter Kirk: I don’t think the PHPMailer class supports SSL. If you want SSL support the Swift SMTP plugin might work for you. It uses the newer SwiftMailer class which I believe does support SSL / TLS.
Thanks, Callum. Unfortunately Swift SMTP doesn’t seem to be working for me, and there has been no response for several months to the thread in their support forum about the error I have encountered. I appreciate your much faster response!
@Tai Graham: I’m not sure what’s causing the issue. It’s hard to debug the problem because there’s no error messages. I think it could be to do with security settings on your server that prevents PHP being able to open a remote connection. If that is the case, unless you can change server settings you won’t be able to send mail via SMTP. You could try the Swift SMTP plugin, if that doesn’t work, it’s probably a server problem.
My host reminds me that using SMTP AUTH without TLS or SSL is a security problem as the password is transmitted across the Internet in plain text. That means that spammer who intercepts this password can hijack the SMTP server as a spam source. Not a good idea.
My host also helped me discover my problem with Swift SMTP. I was asked to use TLS on port 25 of the host’s mailserver, a separate system from where my blog is hosted. But Swift has some deliberate code written so that if port 25 is selected the host name is set to “localhost” and TLS and SSL are disabled. My host tells me that although SSL should be on port 465, it is correct according to rfc2487 for TLS to be on port 25.
One advantage of Swift is that it lets you send a test message and displays any error reports. You might want to add that facility as it would help you debug problems like Tai’s.
@Peter Kirk: Thanks for posting back the details. That’s an interesting idea, sending a test mail, I think it would work. I tried adding a debugging option, but that doesn’t work.
Who is your hosting company? They sound great!
I tried Cimy Swift SMTP for WordPress, a variant of the other one I tried, and that seems to have solved my problem.
My hosting is currently with BCISGnet, with whom I have a special non-commercial arrangement. They are very security conscious – as I need to be for some things I do, although not for my blog.
I’ve added the ability to send a test email and released the updated plugin as version 0.4. I’ve updated the code on WordPress.org, so automatic updates should be notified in a day or two.
Pingback: Jody Sachse - Wandering the Webernet
Just downloaded and installed WP-Mail-SMTP 0.4 on 10/10/2007. I installed on WordPress 2.3, configured for SMTP w/ Auth pointing to my hosting provider SMTP server and sent the test message smooth as grease. Thanks so much…
Just a quick follow-up. I forgot to mention I’m running WordPress 2.3 locally on a laptop with Windows XP SP2, Apache 2.2.4, PHP 5.2.4 and MySQL 5.0.45. You’d stated you didn’t test the AUTH feature, so with this you’ll have an environment that you can certify as working…
@Max: Great, thanks for the feedback, nice to know it’s working for you.
Pingback: わーどぷれすっ! » WP Mail SMTP
Hello and thanks for this plugin.
When I try to send a test email I get:
Test Message Sent
The result was:
bool(false)
Any suggestions on how to troubleshoot this?
@smelmoth: Try using version 0.4.1, I’ve added more debugging output to the test email function. Hopefully that will shed some more light on the problem.
Hi,
I was having terrible problems with WordPress just not sending any emails, then I came across your plugin. It seems to work (only just begun to test it), so thank you very much for that!
I also get the cannot load message, but I also notice that the “From:” user I set in the options page is not being used. The options page displays it correctly, but still WordPress is sending from the default user wordpress@domainname.
Any ideas?
@YikYak: Aha, there’s a change to the way the mail from is handled in WordPress version 2.3. I’ve updated the plugin to reflect the two new filters, it should work if you download the latest version (0.5.0). Let me know if you have any other problems.
Great plugin Callum. I am going to try it out right now and provide a feedback once I am done molesting it
Pingback: No Runny Eggs » Blog Archive » Housekeeping item
Hi thanks for this plugin. I was really wondering what was wrong with my comment notifications. But when I installed this and set it to SMTP, it worked again.
Thank you very much!
Allen
Thank you Callum! I have been going crazy all night trying to figure out why users aren’t getting registration or password retrieval e-mails (I’m on WP 2.3.1). Your plugin fixed my problem, but only if I specified an e-mail in the “From Email” field (Options->Email after activating the plugin). If I leave that field blank, the test e-mail fails.
@Moncef: Check out your admin email, is that a valid email address? The plugin defaults to the admin email if you leave the From field blank, so perhaps that’s where the problem lies. If the test mail fails, you should get a pretty comprehensive debugging output from the PHPMailer class, which will hopefully shed some light on the problem.
Bottom line, glad it’s working!
hi Dear
dos not Work??
Why ?? why ??
hi
dose not work , Way??
>>>>>>>>>>>>>>>>>if(function_exists(‘load_plugin_textdomain’))
load_plugin_textdomain(‘wp-mail-smtp’,'wp-content/plugins/wp-mail-smtp’);<<<<<<<<>
>> load_plugin_textdomain (plugin-name) <<
@zxo003: That code does not appear within the WP Mail SMTP plugin. I’m guessing you’re using another plugin for language translation, as that code is also not in WP core. Try deactivating your other plugins and then see if WP Mail SMTP works on its own. If it does, re-activate your plugins one at a time to find the problem.
hi
thanks !! thanks !!
bay
Hi.
I’ve got some problems with sending emails, so i tried your plugin.
I’ve got installed it and after have configured all data, i test sending a mail but i’ve got an error :
The result was:
bool(false)
And the “!” is on the line :
["SMTPKeepAlive"]=>
bool(false)
! ["smtp"]=>
&object(smtp)(6) {
["SMTP_PORT"]=>
int(25)
["CRLF"]=>
string(2) ”
Please help me, i don’t know what to do.
Thank you very much, and sorry for my english.