WP Mail SMTP v0.7

I released version 0.7 of the WP Mail SMTP plugin a couple of days ago. To make support a little more manageable I’m going to switch the comments from the plugin page to a post for each version. So please ask in the comments here for all support questions related to version 0.7. If you’re using a previous version, please upgrade and then post your questions here! πŸ™‚

Please be sure to look back at previous questions before posting here. If you’re having a problem where mails are not being sent, or anything of that nature, please post your debugging output. Send a test mail, then copy / paste the response into the comments. Remember to delete any passwords. I’d recommend you replace any @ symbols with something else (at), [at], #at#, etc.

100 thoughts on “WP Mail SMTP v0.7”

  1. Heya!

    First of all: You plugin is really really helpful! *thumbsup*

    … If it would just work πŸ˜‰

    I have a wordpress-blog running and it seemed that it doesn’t send any mails. So I installed you plugin and tried again and everything worked fine as the subscribe2 plugin sent emails.

    Today I noticed that it is no longer possible to register for my blog as the registration ends in a blank screen after I press the submit-button… an email (with the password) is never sent (or doesn’t arrive)

    Any suggestions?

    If you want to try it: australien.kilu.de

    Thank you! Have a nice day!

    Andreas

  2. @Andreas: Sounds like you’re hitting a PHP error, that’s the white screen of death. Look in your web server error logs, you should find some information there.

    Try disabling the plugin, then test again. Do you get registration emails? Or do you still get the white screen of death?

  3. Just an addition to my last comment:

    If I switch from SMTP to php mail() (in the preferences of your plugin) I don’t get a blank screen but a message that I should check my email-account… (but the mail isn’t sent as the mail() doesn’t work)

  4. @Andreas: If switching to mail() works, then you need to check your web server error logs for more information about the problem. Something is dying, and the error message will be in the logs.

    Can you send a test mail from the options page? Does that work ok?

  5. Heya!

    Me again. For now I have a workaround that works (my provider has an experimental function that overwrites the mail()-method and uses smtp instead).
    Additionally I wrote an email to my provider where I can find the server-logs as they are located neither on my webspace nor in the userinterface…

    (Btw. is it “..they aren’t located neither… nor…” or is it “they are located neither… nor…” ? =) )

    And I really like your plugin more than any experimental function without support (they say any question concerning that functionality via email or in the forum will be deleted…… ) =)

  6. @Andreas: I deleted your double posted comment.

    It is “are located neither in a nor in b”. πŸ™‚

    You’ll need to find the error message in the log to make sense of the white screen of death I’m afraid. Either that or you could look at changing the PHP display_errors ini var. That might not be possible though, it depends on your host.

  7. Thank you again – sorry for the double posting…

    I’ll wait for the answer of my host and inform you as soon as I have new information.
    I have no idea where I can find the log files atm…

  8. hello,
    the plugin looks cool..
    but its not working for me using Apache server in my Windows Vista as a localhost
    I am using my gmail id to send mail.. I tried smtp.gmail.com, smtp.comcast.net, localhost and localhost:26 as my SMTP host name.. but noneof them sends the test mail..
    Here’s the trace.. Plz help..

    bool(false)
    [“smtp”]=>
    object(SMTP)#19 (6) {
    [“SMTP_PORT”]=>
    int(25)
    [“CRLF”]=>
    string(2) ”

    [“do_debug”]=>
    int(2)
    [“smtp_conn”]=>
    bool(false)
    [“error”]=>
    array(3) {
    [“error”]=>
    string(27) “Failed to connect to server”
    [“errno”]=>
    int(10060)
    [“errstr”]=>
    string(185) “A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.

    }
    [“helo_rply”]=>
    NULL
    }
    [“to”]=>
    array(1) {
    [0]=>
    array(2) {
    [0]=>
    string(22) “balasubrcn{at]yahoo.co[dot}in”
    [1]=>
    string(0) “”
    }
    }

    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
    (10060)

  9. @bala: I’m guessing localhost won’t work unless you have a local mailserver installed. Do you have a firewall on the machine? Or some anti-virus program that scans outgoing mail? Sounds like a problem along those lines to me, but I’m just guessing.

    If you open a command prompt and type “telnet servername 25” then hit enter, can you connect to the various mail servers you’re trying? If not, then that’s where the problem lies. If you can, it could be an Apache config issue, or a missing module. I’m not really sure.

  10. Thanks Callum.
    I have disabled my firewall and antivirus temporarily but I am not able to telnet to the mail servers. Guess the localhost needs a local mailserver configured.

    Thanks again for the prompt reply.
    ~Bala

  11. @bala: If you’ve disabled firewall and antivirus, my guess it that your ISP blocks port 25. It’s very common for domestic ISPs to block the port to prevent spam. I’m guessing you’re hosting this on a home machine on ADSL / Cable / etc.

    I’d suggest trying an alternate port number for one of the mail servers. Or, use your ISP’s mail server. If that is ComCast and you can’t telnet to their SMTP server on port 25, there is a problem somewhere.

    It’s not necessary to install a mailserver on your machine. In fact, that won’t move you forward because then your local mailserver won’t be able to get out on port 25 either! πŸ™‚

  12. Thanks Callum.
    You are right, my ISP blocks mail relay through port 25. I connected to my schools network and I was able to send mails through port 25.

  13. I installed your wp-mail-smtp plugin and I am having the following error when I try testing it. I am using WordPress 2.3.3 and my hosting is with yahoo. Any ideas? Please help! below is message from the test:

    Test Message Sent

    The result was:

    bool(false)
    The full debugging output is shown below:

    object(phpmailer)(39) {
    [“Priority”]=>
    int(3)
    [“CharSet”]=>
    string(5) “UTF-8”
    [“ContentType”]=>
    string(10) “text/plain”
    [“Encoding”]=>
    string(4) “8bit”
    [“ErrorInfo”]=>
    string(0) “”
    [“From”]=>
    string(21) “support@wordpress.com”
    [“FromName”]=>
    string(7) “Support”
    [“Sender”]=>
    string(0) “”
    [“Subject”]=>
    string(0) “”
    [“Body”]=>
    string(0) “”
    [“AltBody”]=>
    string(0) “”
    [“WordWrap”]=>
    int(0)
    [“Mailer”]=>
    string(4) “mail”
    [“Sendmail”]=>
    string(18) “/usr/sbin/sendmail”
    [“PluginDir”]=>
    string(0) “”
    [“Version”]=>
    string(4) “1.73”
    [“ConfirmReadingTo”]=>
    string(0) “”
    [“Hostname”]=>
    string(0) “”
    [“Host”]=>
    string(9) “localhost”
    [“Port”]=>
    int(25)
    [“Helo”]=>
    string(0) “”
    [“SMTPAuth”]=>
    bool(false)
    [“Username”]=>
    string(0) “”
    [“Password”]=>
    string(0) “”
    [“Timeout”]=>
    int(10)
    [“SMTPDebug”]=>
    int(2)
    [“SMTPKeepAlive”]=>
    bool(false)
    [“smtp”]=>
    NULL
    [“to”]=>
    array(0) {
    }
    [“cc”]=>
    array(0) {
    }
    [“bcc”]=>
    array(0) {
    }
    [“ReplyTo”]=>
    array(0) {
    }
    [“attachment”]=>
    array(0) {
    }
    [“CustomHeader”]=>
    array(0) {
    }
    [“message_type”]=>
    string(0) “”
    [“boundary”]=>
    array(0) {
    }
    [“language”]=>
    array(0) {
    }
    [“error_count”]=>
    int(0)
    [“LE”]=>
    string(1) ”

    }
    The SMTP debugging output is shown below:

  14. @chick: There’s no clues in your current output, can you post the SMTP debugging output as well?

    As an aside, you need to upgrade to WordPress 2.6.2. 2.3.3 has known security issues, it is only a matter of time before your site is exploited.

  15. Hi Callum. Thanks for your reply. That is as far as it goes with the test result. No SMTP debugging output shows

  16. We are currently trying to use the smtp plugin, but no luck. The test message returns no errors (see below) and we have tried setting our hostname as localhost & localhost:26

    How can we check whether the issue is with this plugin or our host server? If the issue is with the host server what options do we have to send emails?

    Test Message Sent

    The result was:

    bool(true)
    The SMTP debugging output is shown below:

    SMTP -> FROM SERVER:
    220-gator351.hostgator.com ESMTP Exim 4.68 #1 Sat, 04 Oct 2008 23:37:11 -0500
    220-We do not authorize the use of this system to transport unsolicited,
    220 and/or bulk e-mail.
    SMTP -> FROM SERVER:
    250-gator351.hostgator.com Hello http://www.flowingrivers.com.au [127.0.0.1]
    250-SIZE 52428800
    250-PIPELINING
    250-AUTH PLAIN LOGIN
    250-STARTTLS
    250 HELP
    SMTP -> FROM SERVER:
    250 OK
    SMTP -> FROM SERVER:
    250 Accepted
    SMTP -> FROM SERVER:
    354 Enter message, ending with “.” on a line by itself
    SMTP -> FROM SERVER:
    250 OK id=1KmLMl-0003wk-VU
    SMTP -> FROM SERVER:
    221 gator351.hostgator.com closing connection

  17. Hi!

    Trying to use your plugin for emailing on a new setup for Worpress Multiuser but having trouble getting it working.
    It installs fine and test-email works. I get this logged:

    Test Message Sent
    The result was:
    bool(true)
    The SMTP debugging output is shown below:

    …and thats it.

    Problem is when I try to make adjustments on the settings page for this plugin and press save I get an error message:

    text: Do you really want to do this? (translated from swedish)

    Link back to settings: Please try again!(translated from swedish)

    And I donΒ΄t get any e-mails when posts and comments are made in the blogs.

    I run wordpress 2.6

    /TL

  18. Hi,

    I’m having the exact same issue as bala above but I’m not sure how he fixed it… can anyone provide some insight?

    Thanks!

  19. @chick: You are using PHP’s mail() function to send email, not SMTP. Have you selected “Send all WordPress emails via SMTP.” in the plugin’s Settings > Email page?

  20. @leonie: From the output you’ve pasted, the email has been accepted by the server at gator351.hostgator.com (your server). So it appears that mail is being sent properly. If you’re not able to download the mail, are you receiving other mail from the server?

    Try using another SMTP server (with authentication). For example, if you have another ISP or a Gmail account.

  21. @Tobbe_l: Options pages are handled differently in WPMU. However, you probably want to set all of your settings in one place for the whole WPMU site. I’m guessing you don’t want site-admins changing the settings. I’ll likely roll a WPMU compatible version of the plugin at some point. Feel free to chase me up by email in a week or two if there’s no progress. πŸ™‚

  22. @Ruiner: Your problem is not related to the plugin, it’s your ISP. My suggestion would be to find an outgoing mail server that will support authentication on a port other than 25. For example, Controlled Mail.
    A Google Mail account will also work, you get what you pay for.

  23. Thanks for your reply. After sending my last email to you, I read at the top of your page that this plugin does not support secure smtp. If this carries true, then, it may not work for me.

  24. I couldn’t get the gmail account to work… what am I doing wrong? Do you have to put the port somewhere? I’m so lost.

  25. @Chick: The phpMailer class that’s shipped with WordPress doesn’t support SSL SMTP. This plugin just modifies the options for that class, so no chance to use SSL. I’d suggest the swift mailer plugin, I believe it’s very good.

  26. @Ruiner: From this page it would appear that Gmail’s SMTP server requires TLS. I think the version of phpMailer shipped with WordPress is quite old in order to retain PHP 4 compatibility, hence I don’t believe it supports TLS.

    So, Ruiner, you’ll need to find another smtp server to use. Your ISP will almost certainly provide you with an SMTP server, especially if they block port 25.

  27. Hi,
    i have installed your plugin and it works for me. I just have a problem
    with the E-Mail Adresse. Where can i edit the recipient Adress ?! The Plugin
    works but the e-Mail are send to a wrong e-mail adress. Hope you can help me
    with that.

    BIG THX !!!!

  28. @Daniel: This plugin has nothing to do with recipient addresses. It does not control who emails are sent *to*. It only controls who the emails are sent *from*, and *how* they are sent.

  29. @Daniel: I’ve no idea what emails you’re talking about. You change your “admin” email in the Settings page. Otherwise, it depends on who the email is supposed to reach, where it’s being generated, and a multitude of other factors. Try the WordPress support forum, IRC channel, and so on.

  30. Hi Callum,

    Recently I use Google Apps for domain, and let google handle all my domain mail accounts.

    So I try your plugin to use Google SMTP. And I receive this error:
    SMTP -> FROM SERVER:
    220 mx.google.com ESMTP 7sm2771765agd.33
    SMTP -> FROM SERVER:
    250-mx.google.com at your service, [66.232.124.67]
    250-SIZE 35651584
    250-8BITMIME
    250-STARTTLS
    250 ENHANCEDSTATUSCODES
    SMTP -> ERROR: AUTH not accepted from server: 530 5.7.0 Must issue a STARTTLS command first. 7sm2771765agd.33

    SMTP -> FROM SERVER:
    250 2.1.5 Flushed 7sm2771765agd.33
    SMTP -> FROM SERVER:
    530 5.7.0 Must issue a STARTTLS command first. 7sm2771765agd.33
    SMTP -> ERROR: MAIL not accepted from server: 530 5.7.0 Must issue a STARTTLS command first. 7sm2771765agd.33

    SMTP -> FROM SERVER:
    250 2.1.5 Flushed 7sm2771765agd.33

    I assume your plugin doesn’t support TLS and custom port (587 in this case). But strangely, sometimes it works! I try to send an email to my Yahoo account and it delivered. But if I try to send to my other Gmail account, it failed.

    Any thoughts of this?

  31. @Jay: I’m not sure what’s going on there. As far as I know, Gmail always requires SSL encryption, and so you need to install a new mail class that supports SSL.

  32. Your plugin looks like it would work nicely for us, except that we’re using WPMU and would need options saved per blog. Is it too early to chase you up for a WPMU compatible version of the plugin? Thanks for any time you can put towards it. Enjoy the sun.

  33. @Byron: There is no time too soon to chase me up! πŸ™‚

    Ok, I’ll make a commitment. I’ll rework the options page so that it is compatible with WPMU for the release of WP 2.7. The same new options structure is going into WP 2.7, so then there won’t need to be 2 versions of the same code for WP / WPMU. I’ll also add the option to set the details in wp-config.php as constants and thus override all the plugin settings. Plus, that would disable the admin page, which might offer a small performance improvement.

    That’s it, commitment made. Now to check when 2.7 is due for release… πŸ™‚

  34. Sounds great. I’m looking forward to trying it out moments after 2.7 is released πŸ˜‰ Cheers.

  35. Hello!
    I’m found of your plugin witch saved my lif e couple of time πŸ™‚

    As I’m French I’ve made the translation of your plugin in a *.pot file.

    But the function load_text_domain doesn’t appear in the php source, so the plugin admin is always in english.

    Can you make the change to make your plugin “internatinalisable”? Do you want me to do the job and send You a link to download the modified PHP file en the both fils needed for the french translation?

    See U soon…

  36. @Yin-Yin: Awesome, thanks for the translation. I’m about to release (write) some upgrades to the plugin, so I can add the text domain stuff at that point. Do you think I should include the French .pot file with the plugin or add it as an optional download? What’s the standard?

  37. wp_mail_smtp.php sounds fine, but I need to know:

    – if I need to copy the file somewhere
    – if I have to configure any parameters
    – if it is another file replacement
    -…

    in order to make use of it

    I have often read “…after installing the plug-in…”, but how ?

    thanx

  38. Greetings. Your plugin appears to work fine on the WP end, but for some reason the messages are not getting to any of my e-mail accounts (I’ve tried several). Do you think there is anything I should change in the settings to help this?

    Output:

    Test Message Sent

    The result was:

    bool(true)

    The SMTP debugging output is shown below:

    SMTP -> FROM SERVER:
    220 [servername] ESMTP
    SMTP -> FROM SERVER:
    [servername]
    250-PIPELINING
    250-SIZE 31457280
    250 8BITMIME
    SMTP -> FROM SERVER:
    250 ok
    SMTP -> FROM SERVER:
    250 ok
    SMTP -> FROM SERVER:
    354 go ahead punk, make my day
    SMTP -> FROM SERVER:
    250 ok 1227199653 qp 11385 by [servername]
    SMTP -> FROM SERVER:
    221 [servername] Goodbye.

    For what it’s worth, I use GoDaddy.

    Thoughts?

  39. @Josh: GoDaddy are very weird. Look back on this thread somewhere there’s a server that was reported to work with GoDaddy. If the server accepts the message, it’s passed on from the plugin, so there’s not much else we can do. Try a different server, that’s my suggestion.

  40. So it turns out the problem was that my boss bought Windows hosting instead of Linux. Plugin seems to work fine now.

  41. Can you tell us if you can add in the configurable port option? I also am using Bluehost and need to use port 26. The options you listed above do not work or change the port from port 25.

    Thanks!

  42. @kevinK: WP 2.7 is out and I promised to release an update when 2.7 came out. I’ll get it out in the next week or so. I’ll include the option to set the port in that update.

  43. You can set the port by adding it to the end of the host like this: smtp.gmail.com:465. What you can’t do with the current plugin is set security. In 2.7, there’s a new SMTPSecure property in phpmailer. I modified the plugin myself to support it, but of course it would be nice if it were added to the official version. SSL is required for gmail, and I would think other ISP’s may also require security.

  44. @Bret: I’ve yet to check out the PHPMailer code in 2.7 so thanks for the heads up. If it supports SSL I’ll add that as an option to the plugin.

Comments are closed.