WP Mail SMTP v0.8

As promised, I’m releasing version 0.8 of the WP Mail SMTP plugin just a few days after WordPress 2.7 was released.

There are some big changes in this version. Firstly, I added option whitelisting to be forward compatible with WordPress. This also makes the plugin compatible with WordPressMU. However, this means version 0.8 is is only compatible with 2.7 or newer. This version will not work on WordPress 2.6.5 or earlier.

I’m going to hold off pushing this update to wordpress.org for a couple of days. I’m hoping to get some feedback from early testers. If there are no disasters, I’ll release 0.8 onto wordpress.org early next week.

Support Questions

If you have a question, please search the questions for 0.7 and the original questions before asking it here.

Please note: If you post email addresses in the body of the comments you will almost certainly receive spam. Please replace all @ symbols with something else when you post the debugging output (not in the email box, just in the comment box).

1,250 thoughts on “WP Mail SMTP v0.8

  1. Is there a way to add multiple email addresses at the same time. I tried the standard email1; email2; email3 format but received an SMTP format error.

    • I don’t understand the context of your question. This plugin only affects how mail is sent by the wp_mail() function, it doesn’t change who the messages are addressed to.

  2. HI Callum

    I got output like this, and I’ve enabled SSL in php.ini

    The result was:

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

    object(PHPMailer)#50 (45) {
    [“Priority”]=>
    int(3)
    [“CharSet”]=>
    string(5) “UTF-8″
    [“ContentType”]=>
    string(10) “text/plain”
    [“Encoding”]=>
    string(4) “8bit”
    [“ErrorInfo”]=>
    string(43) “SMTP Error: Could not connect to SMTP host.”
    [“From”]=>
    string(36) “wordpress@pandascreenproductions.com”
    [“FromName”]=>
    string(5) “Admin”
    [“Sender”]=>
    string(0) “”
    [“Subject”]=>
    string(51) “WP Mail SMTP: Test mail to fanzy.dong@idfglobal.com
    [“Body”]=>
    string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
    [“AltBody”]=>
    string(0) “”
    [“WordWrap”]=>
    int(0)
    [“Mailer”]=>
    string(4) “smtp”
    [“Sendmail”]=>
    string(18) “/usr/sbin/sendmail”
    [“PluginDir”]=>
    string(0) “”
    [“Version”]=>
    string(5) “2.0.4”
    [“ConfirmReadingTo”]=>
    string(0) “”
    [“Hostname”]=>
    string(0) “”
    [“MessageID”]=>
    string(0) “”
    [“Host”]=>
    string(14) “smtp.gmail.com”
    [“Port”]=>
    string(3) “465”
    [“Helo”]=>
    string(0) “”
    [“SMTPSecure”]=>
    string(3) “ssl”
    [“SMTPAuth”]=>
    bool(true)
    [“Username”]=>
    string(18) “fanzy531@gmail.com”
    [“Password”]=>
    string(10) “my-password”
    [“Timeout”]=>
    int(10)
    [“SMTPDebug”]=>
    int(2)
    [“SMTPKeepAlive”]=>
    bool(false)
    [“SingleTo”]=>
    bool(false)
    [“smtp”]=>
    object(SMTP)#51 (7) {
    [“SMTP_PORT”]=>
    int(25)
    [“CRLF”]=>
    string(2) ”

    [“do_debug”]=>
    int(2)
    [“do_verp”]=>
    bool(false)
    [“smtp_conn”]=>
    bool(false)
    [“error”]=>
    array(3) {
    [“error”]=>
    string(27) “Failed to connect to server”
    [“errno”]=>
    int(108846888)
    [“errstr”]=>
    string(96) “Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP?”
    }
    [“helo_rply”]=>
    NULL
    }
    [“to”]=>
    array(1) {
    [0]=>
    array(2) {
    [0]=>
    string(24) “fanzy.dong@idfglobal.com”
    [1]=>
    string(0) “”
    }
    }
    [“cc”]=>
    array(0) {
    }
    [“bcc”]=>
    array(0) {
    }
    [“ReplyTo”]=>
    array(0) {
    }
    [“attachment”]=>
    array(0) {
    }
    [“CustomHeader”]=>
    array(0) {
    }
    [“message_type”]=>
    string(5) “plain”
    [“boundary”]=>
    array(2) {
    [1]=>
    string(35) “b1_efda0433d85a1e2b2bc349c695f20616″
    [2]=>
    string(35) “b2_efda0433d85a1e2b2bc349c695f20616″
    }
    [“language”]=>
    array(13) {
    [“mailer_not_supported”]=>
    string(25) ” mailer is not supported.”
    [“provide_address”]=>
    string(55) “You must provide at least one mailer is not supported.”
    [“execute”]=>
    string(19) “Could not execute: ”
    [“instantiate”]=>
    string(36) “Could not instantiate mail function.”
    [“authenticate”]=>
    string(35) “SMTP Error: Could not authenticate.”
    [“from_failed”]=>
    string(35) “The following From address failed: ”
    [“data_not_accepted”]=>
    string(30) “SMTP Error: Data not accepted.”
    [“recipients_failed”]=>
    string(56) “SMTP Error: The following SMTP Error: Data not accepted.”
    [“connect_host”]=>
    string(43) “SMTP Error: Could not connect to SMTP host.”
    [“file_access”]=>
    string(23) “Could not access file: ”
    [“file_open”]=>
    string(33) “File Error: Could not open file: ”
    [“encoding”]=>
    string(18) “Unknown encoding: ”
    [“signing”]=>
    string(15) “Signing Error: ”
    }
    [“error_count”]=>
    int(1)
    [“LE”]=>
    string(1) ”

    [“sign_cert_file”]=>
    string(0) “”
    [“sign_key_file”]=>
    string(0) “”
    [“sign_key_pass”]=>
    string(0) “”
    }
    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport “ssl” – did you forget to enable it when you configured PHP? (108846888)

    • The issue lies in your PHP settings. Honestly, I don’t really understand what you need to modify. But the change lies somewhere in php.ini and the modules you have installed and configured, that’s as much as I know.

      • I have the same issue after I upgraded to WordPress 3.0.

        Is there any page where I can download any of the older version of the same plugin to see if that makes a difference? May be I upgraded your plugin and the new one is causing this error?

        • Did the same settings work in the past? I’m pretty confident there’s no major regressions in the plugin. You can see older versions here if you want to check them. I’m sorry I can’t be of more help. I believe the issue lies with PHP but I’m not sure where.

          • Yeah, the plugin was working absolutely fine until I upgraded to WP3. So I guess its something to do with wordpress and not your plugin.

  3. hey !

    i just started playing with Your plugin but i have some problem.
    Im recievieng this :

    ———————————————————
    Test Message Sent

    The result was:

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

    SMTP -> FROM SERVER:
    220 mail.orange.pl ESMTP
    SMTP -> FROM SERVER:
    250-mail.orange.pl
    250-PIPELINING
    250-AUTH=LOGIN PLAIN
    250-AUTH LOGIN PLAIN
    250-SIZE
    250-X-RCPTLIMIT 100
    250 8BITMIME
    SMTP -> FROM SERVER:
    250 ok
    SMTP -> FROM SERVER:
    250 ok
    SMTP -> FROM SERVER:
    354 go ahead
    SMTP -> FROM SERVER:
    250 ok 1267802218 qp 25880
    SMTP -> FROM SERVER:
    221 mail.orange.pl
    ———————————————————

    but i didnt recive any email message..

    can You help me with that ?

    best,
    Przemek

    • Looks like the email was generated and accepted by the mail server. From the mail server there are a lot of steps to you receiving the email in your mail client. Any of those could be the issue. Try using a different mail server, see if that works. Otherwise, try sending a message to the mail server from your client. See if it works that way. I’m not sure where your problem lies, but the plugin appears to be working correctly.

  4. Good day,

    I’m getting the error message below, using my gmail account.

    Test Message Sent

    The result was:

    NULL

    The full debugging output is shown below:

    object(PHPMailer)#211 (45) {
    [“Priority”]=>
    int(3)
    [“CharSet”]=>
    string(10) “iso-8859-1″
    [“ContentType”]=>
    string(10) “text/plain”
    [“Encoding”]=>
    string(4) “8bit”
    [“ErrorInfo”]=>
    string(0) “”
    [“From”]=>
    string(14) “root@localhost”
    [“FromName”]=>
    string(9) “Root User”
    [“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(5) “2.0.4”
    [“ConfirmReadingTo”]=>
    string(0) “”
    [“Hostname”]=>
    string(0) “”
    [“MessageID”]=>
    string(0) “”
    [“Host”]=>
    string(9) “localhost”
    [“Port”]=>
    int(25)
    [“Helo”]=>
    string(0) “”
    [“SMTPSecure”]=>
    string(0) “”
    [“SMTPAuth”]=>
    bool(false)
    [“Username”]=>
    string(0) “”
    [“Password”]=>
    string(0) “”
    [“Timeout”]=>
    int(10)
    [“SMTPDebug”]=>
    int(2)
    [“SMTPKeepAlive”]=>
    bool(false)
    [“SingleTo”]=>
    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) ”

    [“sign_cert_file”]=>
    string(0) “”
    [“sign_key_file”]=>
    string(0) “”
    [“sign_key_pass”]=>
    string(0) “”
    }

    The SMTP debugging output is shown below:

    Message failed to send to marty.gunderson@solomonlandgroup.com from

    • The output shows your mailer of choice is PHP’s mail() function. Are your settings correct? Try saving them again just to be sure.

        • Try going to wp-admin/options.php and manually changing it from mail to smtp. Does that work? Do you see any error message when you try to update the options? Do you have any other plugins that might affect it?

  5. Hello,

    To begin with, thank you for providing this plugin. It appears to solve a need that myself and other have. Well done!

    Now, the question: in the source code it is indicated that setting default values in wp-config.php should disable the admin page and use those default values for all blog instances in a WPMU install. The todo-list slightly below this text however indicates that this feature is not yet complete. In my testing I have not gotten it to work either, though I am a beginner at both WP and WPMU, so I may be doing something wrong. In my case, the admin page remains and no emails are sent even though the proper values are input into the wp-config.php file. Is the feature not in place yet, or am I going about things wrong?

    Best regards,

    Karl Hammar

    • Also, I should mention that removing the wp-config.php file and setting the SMTP settings for each blog in the WordPress MU install individually works well, so it appears the plugin works, only not picking up the existence of the default configuration file. Any idea on how I could investigate this further? Using version 0.8.3 of the plugin and WordPress MU 2.9.2.

    • That aspect of the plugin has been implemented. The TODO section is out of date, I’ve removed it. Thank you for pointing that out.

      If you copy and paste the section of code into your wp-config.php file, the admin page will disappear and the settings will be applied. This has been tested and it works. If you post a copy of your wp-config.php file I will try to spot any issues. Be sure to remove your passwords.

      • Hello,

        Thanks for replying.

        Okay, so it should work. Then I must be doing something wrong. My wp-config.php is attached below, as per your request:

        Is something obviously wrong with the above? When I at first tried the plugin I did not make use of this config file, but rather entered the settings into the admin page and saved. This worked well. When I then created the wp-config.php file instead, I could see no change in plugin behavior, i.e. the admin page is still there and the blogs that do not have the settings input via this admin page are unable to send email. It’s as if the config file is not read at all. Could it possibly be the case that these settings were persisted in the database and are interfering with the process somehow?

        Cheers,

        Karl Hammar

        • Oops – since the config file contained php start and end tags, it was stripped from the comment. Below is the same file without those tags:

          define(‘WPMS_ON’, true);
          define(‘WPMS_MAIL_FROM’, ‘noreply@magasinetneo.se’);
          define(‘WPMS_MAIL_FROM_NAME’, ‘Magasinet Neo WordPress MU install’);
          define(‘WPMS_MAILER’, ‘smtp’); // Possible values ‘smtp’, ‘mail’, or ‘sendmail’
          define(‘WPMS_SMTP_HOST’, ‘smtp.webfaction.com’); // The SMTP mail host
          define(‘WPMS_SMTP_PORT’, 465); // The SMTP server port number
          define(‘WPMS_SSL’, ‘ssl’); // Possible values ”, ‘ssl’, ‘tls’ – note TLS is not STARTTLS
          define(‘WPMS_SMTP_AUTH’, true); // True turns on SMTP authentication, false turns it off
          define(‘WPMS_SMTP_USER’, ‘***************’); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
          define(‘WPMS_SMTP_PASS’, ‘********’); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true

        • After further reading up on WordPress, it appears to me that I may have made a beginner’s mistake – I assumed that the plugin configuration should be kept with the plugin itself, i.e. that the wp-config.php file should be created inside the plugin directory. I’ve now come to understand that there is a system wide wp-config.php into which one can store configuration settings. However, even pasting the configuration details into this file as prescribed does not work for me – the “Plugins/WP Mail Options” page is still displayed, and the default settings hardcoded into the wp-config.php file are not applied.

          I understand that this type of diagnostic, simply saying “waaah, it does not work!” might not be very helpful. Do you have any ideas about how I could diagnose the problem further to provide better error messages?

          • Please post your entire wp-config.php file. Make sure these tags are above the require() line. That require() line must be the last thing in the file.

  6. I get this:
    Test Message Sent

    The result was:

    int(2)
    The SMTP debugging output is shown below:

    And I can’t tell if that is good or bad. Previously I had been getting the bool error thing, and a full debug deal, so I don’t know if it actually worked. I tried the “Forgot Password” thing, and it actually said it went through, where previously it had been the mail() error thing. Last note is that I am really impressed with your responses. I’m looking at this giant comment column, and you answered everything requiring an answer! Thanks

    • Interesting, I don’t remember seeing an int(2) output before. Let me have a quick look and see what that means…

      Hmm. I’ve had a quick look and I can’t see any reason why you’d get a response of int(2). It seems like you’ll only get either a true or a false value back. Very strange. Can you try with your ISP’s mail server? Will they accept mail without any need for SSL? That might provide a simpler first step to test.

      PS> Thanks for the kind comments about my replies. I usually approve and reply to comments at the same time, so it might look like I’m a little faster to respond than I actually am! :-)

  7. Hi, Callum

    Thank you for this plugin. I, like many people, greatly appreciate the work and that you’re willing to answer questions here.

    My problem is that I’m getting a fatal error on line 428 because it’s not recognising the “esc_html” function, apparently.

    I asked someone who knows more about php and WP than I do and he said it’s because the plugin is expecting a folder called “/plugins/”. Yeah, of course it is. But what has got me confused is that there’s no full filepath in the “wp_mail_smtp.php” file to “/plugins/”. This geezer then said that’s because it’s somehow calling the default filepaths … and [insert gobbledygook here that I’m afraid I didn’t understand :( ].

    Now, I’ve renamed my plugins folder (and changed some of the core WP code to point to the new folder — which, we’ll call “turnips/” say…) and usually I just do a “find’n’replace” in a plugin’s code. So, for example, I simply swap out “/wp-content/plugins/” for “/wp-content/turnips/” in the filepaths.

    I hope I’m making sense here! LOL! But I can’t find any filepaths containing “/plugins/”!

    So, what do I have to alter to get it to point to “/wp-content/turnips/” and not automatically look for “/wp-content/plugins/”

    Thanks very, very much!

    • Wow, sounds like you’re really getting your hands dirty hacking WordPress. :-) I can say with almost complete certainty that your problem does not relate to the name of the folder. I’d say that’s a wild goose chase and then some.

      Which version of WordPress are you using? I accepted somebody else’s code to add a settings link to the plugin page and in doing so, I introduced a requirement on WP 2.8 forwards without realising it. I’ve fixed that but I’ll wait to release until there’s something else. No sense in pushing out a new version just for this obscure fix.

      If you’re using a version of WordPress prior to 2.8, I recommend upgrading as soon as possible. If not, then try posting the error you’re seeing including an excerpt from your PHP error log if you can. I’ll take a look and see what I can recommend.

      • Hi, Callum

        Thanks very much for getting back to me. I’ve finally had time to go back to that site and tinker around again.

        Here’s the weirdness…

        It’s working again, just fine!

        I don’t get WP sometimes. Although, in fairness, it might not be WP’s fault.

        The reason I ended up with your plugin in the first place is that my blog just suddenly stopped sending comment notifications as well as the “rewards” that I offer for commenting — using a commercial plugin called “CommentBait” (great plugin; hate the name!).

        It just stopped. Suddenly. Even though I hadn’t touched the site in weeks.

        So I was looking into a solution and your plugin seemed to be that solution.

        However, my blog has just as suddenly started sending comment notifications and rewards again. And, once again, without my having touched anything.

        I wonder if it’s an issue at my host. Maybe there was an update to PHP or the PHPmailer configuration on that server or something. Who knows!

        Anyway, once again, your plugin seems like a good workaround and I appreciate both your creating it and offering support on it.

        Take care, mate.

        All the best,
        TheNightOwl

  8. Okay, well, I get errors a lot, and I’m not blaming your plugin at all, but I was wondering, what email client, server, whatever should I use, aol, and gmail haven’t worked out well.

    • I’ve had reports of gmail working well. I don’t use gmail so I can’t say from personal experience. Any SMTP mail server that will relay mail should work. I’m not sure what advice to offer in terms of choosing a mail server, it’s a bit beyond the scope of support I want to provide with the plugin.

  9. Greetings! I installed the plugin, the test email fired off great — the only problem is, when trying to register as a new user, hitting the REGISTER button appears to simply refresh to a blank page (wp-login.php?action=register) , and no email is sent. That new user’s name does actually appear in the admin’s user list, though.

    I cannot seem to find anyone else in any forum who is having a similar problem, which makes me worry a little more :) .. Not sure if this is relevant, but one thing of note is that the test email wouldn’t work unless I replaced the host from “smtp.secureserver.net” to “relay-hosting.secureserver.net” and turned off the authentication. (using GoDaddy, found that suggestion on a forum) I’m getting no errors upon registration, though, so I’m stumped how to further diagnose.. Anything tips you could offer would be of great help… thanks!

    Enjoy your travels!
    rM

    • Sounds like you’re seeing the White Screen of Death (WSoD) which happens when PHP dies without outputting an error. That’s a common configuration on many servers. If you disable the plugin, does the registration page still refresh to a blank page?

      • Thanks for the quick response!

        Hmm, peculiar.. disabled the plugin, indeed it still does. It didn’t before, though, (just acted like an email was sent and brought you over to a normal login screen) but then again, it wasn’t sending emails either ;) ..

        cheers
        rm

        • It sounds like the problem lies outside this plugin. I suggest checking your PHP error logs and starting from there. You could also try disabling all your other plugins as well, see if you can isolate the issue to a particular plugin.

          • alrightey sir, thank you. I wasn’t sure (since it’s just a blank screen) if an error was even being generated in the first place.

            • Yeah, there will be an error in a log somewhere, it’s just a matter of finding where. :-) GoDaddy can probably help point you at the PHP error log. Best of luck with it.

      • …by the way, it appears GoDaddy has PHP Safe Mode “on” if that means anything.. It’s shared hosting so I don’t believe they can deactivate that for me personally ;p .. not sure if that’s relevant, just thought I’d throw that out there..

  10. This is rather odd; the latest version was working just fine when I installed it the other day, and now with no changes at all, I’m getting the following error:

    The SMTP debugging output is shown below:

    SMTP -> FROM SERVER:
    SMTP -> NOTICE:
    EOF caught while checking if connectedSMTP -> ERROR: AUTH not accepted from server:

    • Nevermind – fixed. Leave it up to Godaddy to have their smtpout server work PART of the time for relay when you’re really supposed to use a different server. Talk about messing with your head!

  11. Hi, I’m having some issues with this plugin. For some reason when I try and send a test email, or register an account or anything with email it doesn’t work (it used to and I didn’t do anything afaik).

    Now the real problem is that there isn’t any debugging output when I try and send a test email, just a blank page. I’ve tested it with a couple different browsers and it’s the same thing. I don’t have any other plugins that could be interfering, and I’m using the latest version of WordPress and this plugin.

  12. Just to follow up to my comment, I was having the same problem as the person above where it would go to a white screen when registering. Disabling the plugin DID fix this for me, so I guess it is somehow related to this plugin.

    • Check wp-admin/options.php and look for options with the names that start with “mail_” and “smtp_” and then one called “mailer”. Do they exist?

      Now that you’ve deactivated the plugin, can you activate it again? Are you seeing the error appear in your PHP error logs when you try to activate the plugin?

      The code on line 83 is only supposed to fire when the plugin is first activated, so that should happen only once when the plugin is turned on in the admin system. After the plugin is running, this code should be redundant.

  13. Hey there – just a shout out to say thanks for this soft!

    Nice – saved my Subscribe2 install. Makes em both work a treat.

    All the best,

    Sputty

  14. I have tried every variation that I can find in the help, different ports, even using my personal gmail account rather than the apps account setup and I am still not able to get it to work. Any thoughts?

    Test Message Sent

    The result was:

    bool(false)

    The full debugging output is shown below:

    object(PHPMailer)#88 (45) {
    [“Priority”]=>
    int(3)
    [“CharSet”]=>
    string(5) “UTF-8″
    [“ContentType”]=>
    string(10) “text/plain”
    [“Encoding”]=>
    string(4) “8bit”
    [“ErrorInfo”]=>
    string(43) “SMTP Error: Could not connect to SMTP host.”
    [“From”]=>
    string(26) “noreply@slappedwithwit.com”
    [“FromName”]=>
    string(16) “Slapped With Wit”
    [“Sender”]=>
    string(0) “”
    [“Subject”]=>
    string(45) “WP Mail SMTP: Test mail to rcolema3@gmail.com
    [“Body”]=>
    string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
    [“AltBody”]=>
    string(0) “”
    [“WordWrap”]=>
    int(0)
    [“Mailer”]=>
    string(4) “smtp”
    [“Sendmail”]=>
    string(18) “/usr/sbin/sendmail”
    [“PluginDir”]=>
    string(0) “”
    [“Version”]=>
    string(5) “2.0.4”
    [“ConfirmReadingTo”]=>
    string(0) “”
    [“Hostname”]=>
    string(0) “”
    [“MessageID”]=>
    string(0) “”
    [“Host”]=>
    string(14) “smtp.gmail.com”
    [“Port”]=>
    string(3) “465”
    [“Helo”]=>
    string(0) “”
    [“SMTPSecure”]=>
    string(3) “ssl”
    [“SMTPAuth”]=>
    bool(true)
    [“Username”]=>
    string(22) “ron@slappedwithwit.com”
    [“Password”]=>
    string(7) “my-password”
    [“Timeout”]=>
    int(10)
    [“SMTPDebug”]=>
    int(2)
    [“SMTPKeepAlive”]=>
    bool(false)
    [“SingleTo”]=>
    bool(false)
    [“smtp”]=>
    object(SMTP)#86 (7) {
    [“SMTP_PORT”]=>
    int(25)
    [“CRLF”]=>
    string(2) ”

    [“do_debug”]=>
    int(2)
    [“do_verp”]=>
    bool(false)
    [“smtp_conn”]=>
    bool(false)
    [“error”]=>
    array(3) {
    [“error”]=>
    string(27) “Failed to connect to server”
    [“errno”]=>
    int(110)
    [“errstr”]=>
    string(20) “Connection timed out”
    }
    [“helo_rply”]=>
    NULL
    }
    [“to”]=>
    array(1) {
    [0]=>
    array(2) {
    [0]=>
    string(18) “rcolema3@gmail.com”
    [1]=>
    string(0) “”
    }
    }
    [“cc”]=>
    array(0) {
    }
    [“bcc”]=>
    array(0) {
    }
    [“ReplyTo”]=>
    array(0) {
    }
    [“attachment”]=>
    array(0) {
    }
    [“CustomHeader”]=>
    array(0) {
    }
    [“message_type”]=>
    string(5) “plain”
    [“boundary”]=>
    array(2) {
    [1]=>
    string(35) “b1_7f7d14a931131d134bbc1941a990c663″
    [2]=>
    string(35) “b2_7f7d14a931131d134bbc1941a990c663″
    }
    [“language”]=>
    array(13) {
    [“mailer_not_supported”]=>
    string(25) ” mailer is not supported.”
    [“provide_address”]=>
    string(55) “You must provide at least one mailer is not supported.”
    [“execute”]=>
    string(19) “Could not execute: ”
    [“instantiate”]=>
    string(36) “Could not instantiate mail function.”
    [“authenticate”]=>
    string(35) “SMTP Error: Could not authenticate.”
    [“from_failed”]=>
    string(35) “The following From address failed: ”
    [“data_not_accepted”]=>
    string(30) “SMTP Error: Data not accepted.”
    [“recipients_failed”]=>
    string(56) “SMTP Error: The following SMTP Error: Data not accepted.”
    [“connect_host”]=>
    string(43) “SMTP Error: Could not connect to SMTP host.”
    [“file_access”]=>
    string(23) “Could not access file: ”
    [“file_open”]=>
    string(33) “File Error: Could not open file: ”
    [“encoding”]=>
    string(18) “Unknown encoding: ”
    [“signing”]=>
    string(15) “Signing Error: ”
    }
    [“error_count”]=>
    int(1)
    [“LE”]=>
    string(1) ”

    [“sign_cert_file”]=>
    string(0) “”
    [“sign_key_file”]=>
    string(0) “”
    [“sign_key_pass”]=>
    string(0) “”
    }

    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)

    • Ask your host if they allow outgoing connections on port 25, it might be that they’ve blocked traffic either through PHP or at another level (firewall maybe). It sounds like the issue lies somewhere with the host’s setup.

      • Thank you for the reply. I spoke with my host and they swear that the port is open. I am able to send through php(mail with the same settings as smtp, but it wont send through smtp (getting that 110 error). However, it wont send test e-mails to anything but gmail e-mails (well I know it wont send to hotmail and yahoo). I have tried to smtp with other e-mail providers (hotmail, yahoo, etc…) and they all fail.

        • You can send test emails to Gmail addresses via smtp.gmail.com, is that correct? But you’re unable to send emails to any address that is not @gmail.com, is that also correct?

          Do you have a mail server that does not require SSL that you can test with? I believe Gmail require you to use SSL. Your server’s PHP configuration might be preventing or messing with the SSL option.

          • No, I can send test mails if i change to PHP mail() instead of smtp, but the issue there is that it only let me send test e-mails to gmail e-mail addresses, not sending e-mails to hotmail or yahoo.

            I tried setting up using yahoo e-mail and hotmail e-mail with smtp, but that didn’t work either.

            • Please be as specific as possible in answering the specific questions I’ve asked. I’m not familiar with Hotmail or Yahoo’s SMTP service. Have you tested with an SMTP host that does not require SSL?

              Using PHP’s mail() function you’re able to only email gmail addresses, is that correct? This sounds very odd. If the server is accepting mail I can’t see why it would be configured to only relay mail for one domain. Can you ask your host why mail() only works for gmail addresses?

              Ask your host to check the PHP settings around fopen(). If sending mail with SSL disabled gives the same error, I’d guess the issue lies somewhere around the PHP settings for fopen().

  15. Hi,

    I can send a test email no problem but when I try to use “Contact Form 7″ plugin I can not send an email successfully. I have narrowed it down to the wp_mail call. When the headers parameter is included it will fail. If I remove the headers parameter it will succeed but I will never get the email.

    Any ideas?

    this is the line:
    return @wp_mail( $recipient, $subject, $body, $headers );

    I have tried it with and without the @ symbol.

    • I think other people have reported the plugin working with Contact Form 7. Try adding var_dump($headers); on the line above. That will output the value of $headers to the screen. This might shed some light on why that value is causing issues. If you can post back the output from the var_dump() I’ll look it over and see if I have any further suggestions.

      • Since the mail code uses AJAX I had to do var_dump in a slightly different manner. Here is the output:

        string(39) “From: test “

      • Here is a very useful piece of information I forgot to include. I am on a godaddy account. I can send the email fine to my own hosted account (same domain) but not to an external email address. This tells me that Contact Form 7 is not using your smtp plugin. Even though it is using the wp_mail function!

        ps. the last post looks like it got filtered. the test should have been:
        string(39) “From: test “

        • Try modifying that line to this:
          $headers = array($headers); return @wp_mail( $recipient, $subject, $body, $headers );

          If you disable the WP Mail SMTP plugin, does Contact Form 7 send emails correctly? If not, I think the issue might lie in that plugin. I’ve looked at the code of Contact Form 7 and the wp_mail() call looks fine. The code is quite complex, I’m not sure if it is somehow being fired before the other plugins are loaded. If that is the case, and wp_mail() is being called by Contact Form 7 before plugins are loaded, that would mean the settings in WP Mail SMTP are ignored. I recommend contacting the Contact Form 7 author to see if they can help at all. I’m at a loss as to what to suggest.

  16. trying to get the plugin working with wpmu. followed the instructions, but the plugin settings menu is still showing up.

    here are the variables I have inserted into my wp-config.php:

    //inserted to use gmails smtp servers for sending ALL emails in conjunction with the wp-mail-smtp plugin
    define(‘WPMS_ON’, true);
    define(‘WPMS_MAIL_FROM’, ‘suport@zice.ro’);
    define(‘WPMS_MAIL_FROM_NAME’, ‘zice.ro’);
    define(‘WPMS_MAILER’, ‘smtp’); // Possible values ‘smtp’, ‘mail’, or ‘sendmail’
    define(‘WPMS_SMTP_HOST’, ‘smtp.gmail.com’); // The SMTP mail host
    define(‘WPMS_SMTP_PORT’, 465); // The SMTP server port number
    define(‘WPMS_SSL’, ‘ssl’); // Possible values ”, ‘ssl’, ‘tls’ – note TLS is not STARTTLS
    define(‘WPMS_SMTP_AUTH’, true); // True turns on SMTP authentication, false turns it off
    define(‘WPMS_SMTP_USER’, ‘mygmailaddress’); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
    define(‘WPMS_SMTP_PASS’, ‘password’); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true

    don’t know what I could be missing here…

    • Please paste your whole wp-config.php file (I recommend you blank out any usernames, passwords and other sensitive data). I’ll look at the whole file and see if I can make any suggestions.

        • got filtered, sorry, I’ll try again

          thanks, here you go:

          /**
          * The base configurations of the WordPress.
          *
          **************************************************************************
          * Do not try to create this file manually. Read the README.txt and run the
          * web installer.
          **************************************************************************
          *
          * This file has the following configurations: MySQL settings, Table Prefix,
          * Secret Keys, WordPress Language, and ABSPATH.
          *
          * This file is used by the wp-config.php creation script during the
          * installation.
          *
          * @package WordPress
          */

          /*manually inserted for bbpress integration*/
          define( ‘COOKIEHASH’, ‘blankedout’ );
          define( ‘COOKIE_DOMAIN’, ‘.zice.ro’ );
          define( ‘SITECOOKIEPATH’, ‘/’ );
          define( ‘COOKIEPATH’, ‘/’ );

          // ** MySQL settings – You can get this info from your web host ** //
          /** The name of the database for WordPress */
          define(‘DB_NAME’, ‘blankedout’);

          /** MySQL database username */
          define(‘DB_USER’, ‘blankedout’);

          /** MySQL database password */
          define(‘DB_PASSWORD’, ‘blankedout’);

          /** MySQL hostname */
          define(‘DB_HOST’, ‘localhost’);

          /** Database Charset to use in creating database tables. */
          define(‘DB_CHARSET’, ‘utf8′);

          /** The Database Collate type. Don’t change this if in doubt. */
          define(‘DB_COLLATE’, ”);
          define(‘VHOST’, ‘yes’);
          $base = ‘/';
          define(‘DOMAIN_CURRENT_SITE’, ‘zice.ro’ );
          define(‘PATH_CURRENT_SITE’, ‘/’ );
          define(‘BLOGID_CURRENT_SITE’, ‘1’ );

          /** disable Revisions */
          define(‘WP_POST_REVISIONS’,false);

          /** extend the Autosave timing */
          define(‘AUTOSAVE_INTERVAL’,300);

          /**#@+
          * Authentication Unique Keys.
          *
          * Change these to different unique phrases!
          * You can generate these using the {@link http://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
          *
          * @since 2.6.0
          */
          define(‘LOGGED_IN_KEY’, ‘blankedout’);
          define(‘LOGGED_IN_SALT’, ‘blankedout’);
          define(‘AUTH_KEY’, ‘blankedout’);
          define(‘SECURE_AUTH_KEY’, ‘blankedout’);
          define(‘SECURE_AUTH_SALT’, ‘blankedout’);
          define( ‘NONCE_KEY’, ‘blankedout’ );
          define( ‘AUTH_SALT’, ‘blankedout’ );
          /**#@-*/

          /**
          * WordPress Database Table prefix.
          *
          * You can have multiple installations in one database if you give each a unique
          * prefix. Only numbers, letters, and underscores please!
          */
          $table_prefix = ‘blankedout';

          /**
          * WordPress Localized Language, defaults to English.
          *
          * Change this to localize WordPress. A corresponding MO file for the chosen
          * language must be installed to wp-content/languages. For example, install
          * de.mo to wp-content/languages and set WPLANG to ‘de’ to enable German
          * language support.
          */
          define (‘WPLANG’, ‘ro_RO’);

          // double check $base
          if( $base == ‘BASE’ )
          die( ‘Problem in wp-config.php – $base is set to BASE when it should be the path like “/” or “/blogs/”! Please fix it!’ );

          // uncomment this to enable wp-content/sunrise.php support
          define( ‘SUNRISE’, ‘on’ );

          //inserted to use gmails smtp servers for sending ALL emails in conjunction with the wp-mail-smt plugin
          define(‘WPMS_ON’, true);
          define(‘WPMS_MAIL_FROM’, ‘suport@zice.ro’);
          define(‘WPMS_MAIL_FROM_NAME’, ‘zice.ro’);
          define(‘WPMS_MAILER’, ‘smtp’); // Possible values ‘smtp’, ‘mail’, or ‘sendmail’
          define(‘WPMS_SMTP_HOST’, ‘smtp.gmail.com’); // The SMTP mail host
          define(‘WPMS_SMTP_PORT’, 465); // The SMTP server port number
          define(‘WPMS_SSL’, ‘ssl’); // Possible values ”, ‘ssl’, ‘tls’ – note TLS is not STARTTLS
          define(‘WPMS_SMTP_AUTH’, true); // True turns on SMTP authentication, false turns it off
          define(‘WPMS_SMTP_USER’, ‘blankedout’); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
          define(‘WPMS_SMTP_PASS’, ‘blankedout’); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true

          // uncomment to move wp-content/blogs.dir to another relative path
          // remember to change WP_CONTENT too.
          // define( “UPLOADBLOGSDIR”, “fileserver” );

          // If VHOST is ‘yes’ uncomment and set this to a URL to redirect if a blog does not exist or is a 404 on the main blog. (Useful if signup is disabled)
          // For example, the browser will redirect to http://examples.com/ for the following: define( ‘NOBLOGREDIRECT’, ‘http://example.com/’ );
          // define( ‘NOBLOGREDIRECT’, ” );
          // On a directory based install you can use the 404 handler.

          // Location of mu-plugins
          // define( ‘WPMU_PLUGIN_DIR’, ” );
          // define( ‘WPMU_PLUGIN_URL’, ” );
          // define( ‘MUPLUGINDIR’, ‘wp-content/mu-plugins’ );

          // Uncomment to disable the site admin bar
          // define( ‘NOADMINBAR’, 1 );

          define( “WP_USE_MULTIPLE_DB”, false );

          define(”ENABLE_CACHE” ,true); //added manually for object cache, unnecessary?
          define(‘WP_CACHE’, true); //Added by WP-Cache Manager
          //-WP Tuner Plugin by MrPete————
          //————————————–
          $wpTunerStart = microtime(); // get start time as early as we can
          if ( function_exists( ‘getrusage’ ) ) { $wpTunerStartCPU = getrusage(); }
          @include_once(dirname(__FILE__).’/wp-content/plugins/wptuner/wptunertop.php’); // fire up WPTuner
          //————————————–
          //-END WP Tuner Plugin——————
          /* That’s all, stop editing! Happy blogging. */

          /** WordPress absolute path to the WordPress directory. */
          if ( !defined(‘ABSPATH’) )
          define(‘ABSPATH’, dirname(__FILE__) . ‘/’);

          /** Sets up WordPress vars and included files. */
          require_once(ABSPATH . ‘wp-settings.php’);

          in case it goes wrong, here is a link to the file on pastebin: http://pastebin.com/xUVeCxXQ

          • Thanks for posting, your file looks fine.

            My apologies. I included a patch that was submitted to me and inadvertently added a second options page which I had no idea existed. It was a complete mistake on my part. I’m deeply sorry for the lack of care and attention to the code I pushed out under my name. I’ll try to make sure this doesn’t happen again.

            I believe version 0.8.4 will resolve your issue. I’m emailing you a copy now because it will take a little time to reach wordpress.org.

  17. Callum,
    When I try the Settings page I’m getting “You do not have sufficient permissions to access this page” after updating the plugin to version 0.8.4 (/wp-admin/plugins.php?page=wp-mail-smtp/wp_mail_smtp.php)

    The file permission for wp_mail_smtp.php on my server is 644, like all other plugins, and the wp-mail-smtp folder has permissions set to 755, also like other plugin folders.

    • Wow, I really, really screwed up adding that Settings link! Apologies, the link doesn’t work. However, if you go to the menu under “Settings” you should see “Email”, that is the correct link.

      I’ll think over whether I want to push out a new version so quickly after to fix this bug. Again, I’m really sorry for all the recent hassles. If anyone would like to take over the maintenance of the plugin I’d be happy to hand it over.

      • Callum,
        The plugin works fine, and the Settings>Mail way is good. As for pushing an update soon, I don’t think users will mind.

        Thanks for the quick reply AND for writing the plugin!

  18. When i try to go to settings i get this message:

    “You do not have sufficient permissions to access this page.”

    all help apreciated

    thank you

  19. I installed the plug in, activated and click on settings and all I get is a blank screen in the center and my admin controls along the left?

    • You can access the admin screen through Settings > Email. I borked the settings menu in version 0.8.4 and failed to fix it in 0.8.5. It’s now fixed in 0.8.6, I dearly hope anyway!

  20. Hello,

    First of all, thanks for the plugin. It seems to work fine… happy me !

    I have a question regarding the usage of the wp_mail() directive. It seems that mail send out by another plugin is not correctly handled somewhere. All mails arrive in raw state, so with all the line breaks and so on in them. The smtp server does nothing but relay, so i think it’s in the way the other plugin calls the function.

    Do you have any idea how to call the wp_mail() or modify the header so the mail will be transported through as html ?

      • Thanks for the swift reply:

        Its about Zingiri webshop. They deliver excellent support by the way, but i thought i might be able to point them in the right direction with a little help from you.

        http://wordpress.org/extend/plugins/zingiri-web-shop/

        The shop sends out confirmation emails on order, at first this was handled by php mail, regardless of the setting in the wp backend for using smtp. Now they changed that to choose which setting u want to use so i can use your plugin, but all mails arrive raw with the tags displayed.

        • Ok, you’re getting the emails but the HTML is displayed as raw text instead of as HTML. Is that correct?

          That sounds like an issue with how the Zingiri web shop is sending emails. Do the emails arrive properly if you disable the WP Mail SMTP plugin?

          PS> Please click the Reply button to this comment to keep the conversation in one place.

          • Spot on ! But they solved it last night. Thank you for putting up with my questions. I had to change some lines in one of the .php files and pronto, it all works.

            It would not have been possible without your plugin.

  21. I downloaded as I am trying to make Subscribe 2 work, and someone said that this needed to be installed.

    this is what I got:

    Test Message Sent

    The result was:

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

    object(PHPMailer)#65 (45) {
    [[ deleted by admin to save screen space ]]
    }
    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)

    • Read this. This question has been asked and answered many times, please do your own research before wasting my time asking for information that’s already available.

        • Kellie, you asked a question which has been asked and answered many, many times already. The answer is included in the plugin’s support page. I wrote, released and support this plugin for free, as a gift to the WordPress community. When people ask questions without first reading the FAQ, I feel like my gift is being mistreated and my time abused. I apologise that my message was rude. I received the same question twice in one day and I overreacted.

          • Thank you.

            I did read the support page and maybe I am missing something, but looks like there have been issues…but I just loaded my site onto wordpress and find all these apps are not working right off the bat. I am not a programer, a professional photographer. I dont have time to waste either as my business is very busy.

            I have also seen issues reported on another site…I guess I overreacted as well, but I honeslty am trying to make this thing work and I have become frustrated as others apparently.

            Off to a wedding, no time to go back and try to figure it out now…maybe another day :)

  22. hi

    i had use your plugin not long ago together with contact forms. it seemed to work fine but i noticed that the plugin replaced the senderadress with the standard email account that stand in the wordpress properties.
    That wasn’t very useful so i cant answer someone directly.
    is it possible to tell the plugin to not doing this?
    THX

    • If you deactivate this plugin, does the correct sender address appear on your email? The modification of sender information is very carefully written to only make changes when the from name and address are the WordPress defaults.

      • >If you deactivate this plugin, does the correct sender address appear on your email?<

        yes it does – but i had change the default adress in wordpress properties to my own. is that the problem?

        • How did you change the default address? Through the WP Mail SMTP plugin? Or somewhere else?

          If I understand your problem correctly, you enable the plugin, enter a custom sender name / address, and now all your emails have that address instead of only some emails. Is that correct?

          • The opposite is the case. Every custom Sender will be replaced by the default Address in wordpress.

            Maybe i did not understand correct what do you mean with “default address” : if you generally ment that this is the address that is registered in properties->general (? dont know exactly because i use a german wordpress) then every custom sender will be replaced by the default address

            • I’m struggling to understand your issue. Which version of WordPress are you using? I’m running 2.9.2, I have a custom from name, and it appears only on the correct emails. If you disable the plugin, do your emails have “WordPress” as the from name and the email in options-general.php as the from email address? For example “From: WordPress“. Is that correct?

              Do you have any other plugins installed that could be affecting it? This functionality works for me, and I haven’t had any other bug reports for this feature. I’m not sure how to further investigate your problem.

              • Hi
                Okay now i’d read the preferences again ;)
                >You can specify the email address that emails should be sent from. If you leave this blank, the admin email will be used.You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress.<
                work as it should, and thats the problem for me :)
                I use contact form 7 in which people can provide their email address. without your plugin this address will be used as sender (thats what i want) … with your plugin this sender will be overwrite either by the address that is written inside the plugins configuration or if the field is leave blank with the default admin address.

                So if i recieve an email i cant answer directly to the sender. maybe my problem is discriped more exact

                • Can you try disabling all other plugins except Contact Form 7 and WP Mail SMTP? Does that work any better?

                  What about comment notification emails? Do those work correctly? Are you seeing the user’s name when you get a comment email? Are you able to reply to them?

                  Have you tried contacting the Contact Form 7 author?

                  I understand your problem. I’m using the same option on my own site, and it works as it should do. I haven’t had any other bug reports relating to this issue. I’ve also double checked the code and it all still looks good. I’m at a loss as to what I can suggest. The only thing is maybe I could take a look at your server, but it will be a week or two before I have time to do that, if you’re willing.

                  • hi callum
                    at first thank you very much for beeing that patient with me ;)

                    I will try the tipps that you gave me in the next days. maybe i will take up on your offer to look at my server.

  23. Test Message Sent

    The result was:

    bool(false)

    The full debugging output is shown below:

    [[ deleted by admin to save screen space ]]

    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)

    It is not working.. how come?

    • Read this. This question has been asked and answered many times, please do your own research before wasting my time asking for information that is already available.

  24. I wish to ask something of you: when using the PHP mail() function, there is a security issue because the header of the email is showing the actual user name of the site manager account at the hosting company, not the details you typed at the plugin page.
    Please see the following article and see if it can help you enhance the plugin so the header “from” data will be the same as the site owner used in the plugin page.
    Thanks.

    http://support.hostgator.com/articles/getting-started/general-help/php-email-from-header

    • This is handled by WordPress and phpMailer. If you set a “From:” header as hostgator recommends, WordPress will automatically remove it and set the $phpmailer->From and $phpmailer->FromName values instead.

      I recommend you use SMTP instead if you want to more fully control the headers set on emails.

        • I think it might be technically possible, but I’m not sure. I don’t think it’s something that is properly achieved through this plugin though. I’ve written a small custom modification for you which might work. I’ll send you it now and hope it works for you. If it works and there is greater demand in the future, I may add it as an option.

  25. Got a couple of problems..
    Windows based server

    – Plugin installs fine, but when activating it I get the following message:
    PHP Warning: Invalid argument supplied for foreach() in D:\CustomerData\webspaces\webspace_00101151\wwwroot\wp\wp-content\plugins\wp-mail-smtp\wp_mail_smtp.php on line 86

    If I press my browser back button, I see that the plugin has activated, despite that error message

    second problem:

    I just can’t get the plug in to work! Infact, I’ve tried a bunch of other plugins that do the same thing – None of them work..

    I’m using the gmail settings – Using my own personal gmail account, and also even tested with my own ISP details.
    Double checked and re-entered the information a billion times over the last day of trying – and every time getting an error to the effect of:

    “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)
    .”

    Real odd, as I know my info is correct, and I refuse to believe that the problem lies at Googles end.. It’s got to be a problem at my end, and for the life of me I can’t figure out why (and going a little crazy in the process!)

    any help appreciated!

    • Callum,

      I know the problem of “SMTP -> ERROR: Failed to connect to server” is a common problem, and I’ve looked through all your documentation and threads for any hint of a solution..

      The only thing I have found is where you have said “Check your php.ini settings around fopen() permissions”

      Can you give me a little more information on how I go about doing this? Where do I find the php.ini setting..
      I’m kinda new to php – but have messed around with it enough over the last 12 months that I don’t mind getting my hands dirty once pointed in the right direction..

      So I guess, just to recap on my situation:

      – Windows server
      – set up wp-mail-smtp to work through Gmail (following your instructions)
      – recieving the error “Failed to connect to server…”
      – site Host provider has confirmed that the server is all cool with smtp
      – even tried my own ISP email account and settings (no love with that either)
      – I’m going a little crazy looking for a solution (been working on this problem for over 24 hours now)
      – help!

      • I deleted your debug comment. I’m assuming this comment and your other one are about the same issue, so I’ll only reply here.

        Honestly, I’m really not sure PHP settings are required. I think the issue lies around fopen() settings. If the host allows outgoing fopen() connections to remote urls, I think the plugin works. I haven’t personally experienced the “cannot connect to server” issue, so I haven’t personally resolved it. I believe other people have found and fixed the issue, but I’m not sure how they did that. If you can get it to work, I’d be grateful if you would post the necessary changes to php.ini back here. :-)

        Sorry I can’t be of more help at this time.

        • I’ve finally found a solution!!!!!
          Tested with Contact Forms 7!!

          The whole problem was caused by the email address I had given as the “From Email” and “Send To Email”

          In my instance I had to make sure that I used an email address from the same domain as the actual website itself, with the hosting company’s SMTP details (pretty obvious huh!, but trust me, this had me stumped for almost 3 days!)

          Using my Gmail smtp setting still doesn’t work, and no other email address I used would either. My sites hosting company even tried to tell me that I needed to enter my ISP smtp details (which didn’t make sense to me, and didn’t work anyway)

          But an email address from the same domain as the website does work!! And that’s all I care about!

          Now I can get some sleep.. or get drunk!

  26. Hi Callum,

    I was using Contact Form 7, having successfully been using your plugin for other functions (Thank you!). However, my host decided to block my email as soon as someone used the form with a gmail account to contact me.
    When the email came through, it appeared as if it was coming directly from the person’s email account so I could respond. All seemed fine until I got this:

    Hi,
    The reason that the mail was blocked is that someone had sent a Gmail email using our outgoing server. It may be that they have both accounts set up in their mail client and the Gmail one is set to use our server.
    This is against our terms of use as it can result in us being blacklisted. We have to ensure that you have taken steps to resolve the issue. We operate a three strikes policy and were it to happen a third time we wouldn’t reinstate your mail services.
    The following log was generated :

    Auth ID stickman@stickmancartel.com has sent 1 gmail emails…
    Locking LDAP password…Success – LDAP password locked ASMTP Caches cleared Source IP Address is last recorded as: xxxxxx

    It may be wise to look at the script of the form on your website in order to ensure that we don’t flag up your account again.

    Please forgive me if I am being naive about this, but i’ve had a look and couldnt find a similar issue. Do you know how I can prevent this from happening?

    Thanks

    • I think the issue is that WordPress wants to “fake” the sender, so the email appears to come from the person filling in the form. It seems like your host disallows that when the “from” email address is a google address. You could use a different SMTP server. I haven’t heard of this issue with Google’s outgoing mail service, or with any other hosts. I’d guess any other SMTP server would work fine. You could also ask your host if they can disable this on your account. If you explain the full context of what you’re doing they might be understanding.

  27. The plugin works fine in my blog. But when I try to connect with WindowsLive Writer to post an article, I get this following error (who does not appear when I disable ONLY your plugin) – it seems that it adds few characters (few pairs of CRLF as I see with Fiddler):
    WindowsLive.Writer.CoreServices.XmlRpcClientInvalidResponseException: Invalid response document returned from XmlRpc server —> System.Xml.XmlException: Unexpected end of file while parsing Name has occurred. Line 173, position 13.
    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.Throw(String res, String arg)
    at System.Xml.XmlTextReaderImpl.Throw(Int32 pos, String res, String arg)
    at System.Xml.XmlTextReaderImpl.ParseQName(Boolean isQName, Int32 startOffset, Int32& colonPos)
    at System.Xml.XmlTextReaderImpl.ThrowTagMismatch(NodeData startTag)
    at System.Xml.XmlTextReaderImpl.ParseEndElement()
    at System.Xml.XmlTextReaderImpl.ParseElementContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlLoader.LoadNode(Boolean skipOverWhitespace)
    at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
    at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace)
    at System.Xml.XmlDocument.Load(XmlReader reader)
    at System.Xml.XmlDocument.LoadXml(String xml)
    at WindowsLive.Writer.CoreServices.XmlRpcMethodResponse..ctor(String responseText)
    — End of inner exception stack trace —
    at WindowsLive.Writer.CoreServices.XmlRpcMethodResponse..ctor(String responseText)
    at WindowsLive.Writer.CoreServices.XmlRpcClient.CallMethod(String methodName, XmlRpcValue[] parameters)

    [Radu: I’ve deleted the res because it was too long]

    • This, sir, is a truly interesting bug report. Most of the issues reported here are one form of user error or another. This is something I have not seen before. :-)

      I’m really not sure what’s causing this issue. I’ve just checked over the code, and I don’t see anything that would cause erroneous line breaks to be output. Do you have all your other plugins disabled to test? I recommend disabling all plugins, then activate this one only, test, and see if that works. It could be that this plugin and another activated at the same time cause the issue. I’m stretching, but I’m not sure what else to suggest. Please report back and hopefully we can figure it out.

  28. Callum, Thanks for bringing us the brilliant plugin!

    But one thing I don’t understand with implementation of the plugin is:

    why do you override the “From” field for the email with the WordPress administrator ‘s email, instead of just using the “From Email” user specified in the plugin’s setting? This will cause the following error which has taken me hours to find out the root cause:

    SMTP -> ERROR: MAIL not accepted from server: 550 5.7.1 Client does not have permissions to send as this sender

    Hope it updated in the next version. Thanks!

    • I don’t fully understand your comment. As I read the code, this is what happens.

      When an email is sent, we filter the From email and From name values. If they are different from the WordPress defaults (maybe generated from a contact form), we leave them unchanged. If they are the default (WordPress

      Are you reading the code differently? Or are you experiencing something different?

      Interestingly, I’ve noticed what I wrote on the admin page is wrong. I say that the “admin email” will be used if the From email is blank. That’s not true. Apologies if that caused confusion. I continue to be amazed at how many bugs can be found in so little code! Thanks for helping me to track down this one.

  29. Hi and Thanks for your very good and helpfull plugin!

    I have a question about the password text field in the options. Why is the password not hidden?
    In my opinion it is a very bad security vulnerability.
    Firstly, because there may be more than one administrators of the page but only one of them could be the post box owner and it’s nasty that the other one could read the user name, the password and where the server is. With that he also could read the E-Mails.
    Secondly, the bad, bad hacker could get the Blog-Password and will have no problems to get the post box password too… really annoing. :(

    Please tell me when you will have some thoughts about it otherwise i will try to modify the code by myself.

    Thanks again for Your good work!

    Paul

    • This has been discussed before, please check back through the history. It’s not possible to encrypt the password, it needs to be passed in plain text to the mailer.

      • Thanks for the reply! :)

        I apologize but 409 Comments… :D. How about a forum?

        I thought about this problem too, but what if the password would be saved in the db. It could still be the plain text but there would be no more need to place it right at the face?
        Aw and besides, would this made any problems?
        <input name="smtp_pass" type="password" …

        • You make an excellent point! A forum would be good, but I’m not sure I want to install and maintain a forum just for this plugin. Maybe I could use an iframe and Tangler or something like that. I’d be grateful for any suggestions on how to make it easier without increasing the workload my end. I feel like I already make a significant effort to maintain the plugin and answer questions posted here. I feel like asking people to manually search the 5-10 pages of archives is a reasonable trade off for free software. :-)

          I prefer to have the password in plain text. I think it’s better that plugin users understand it’s stored and visible in plain text. Using your suggestion of type=password means the password wouldn’t be on the screen but it would still be visible in the source code. I don’t think that provides any security against someone with malicious intentions, but it might give a user a false sense of security if they think their password is somehow “protected”. Short of some kind of encryption, I prefer to be clear that the password is in plain text and in plain sight.

          • Unfortunately i don’t have any experience with forums and how much more work they produce but i think more than 500 comments and questions are a good reason even its only for one plugin. May be there will be more plugins or other stuff to discuss. :)

            You’re right about type=”password”.

            I will let you know when i figure out some kind of solution or ideas. Thanks for the discussion, have a nice rest of the week! :)

  30. Firstly, thank you for the WP-Mail-SMTP plugin – it should be a great help.
    I am sending the SMTP through a different server than what WP is installed (host that has WP doesn’t allow a large amount of emails to be sent out).

    The emails seem to be sent out very slow when using SMTP. Sending to 5,000 subscribers takes about 2 hours.

    The hosting company of the server that I am using for SMTP said the that the logs show that the WP server is sending the email requests out about 3 minutes apart. Are there any settings within WP-Mail-SMTP that breaks up the emails as they go out?

    • Apologies for the slow response. Your numbers don’t add up as I’m reading them. If the emails are being sent every 3 minutes, you could send only 40 emails in 2 hours, not 5’000. I’d say 5’000 messages in 2 hours is a reasonable speed, but I’m not an expert in such things.

      Are you using another plugin to send the 5’000 emails? Perhaps it has some sort of queuing mechanism? There’s nothing in the WP Mail SMTP code that relates to limits or time delays or anything of that nature.

  31. Cant get emails to work:
    Test Message Sent

    The result was:

    bool(false)

    The full debugging output is shown below:

    object(PHPMailer)#173 (45) {
    [“Priority”]=>
    int(3)
    [“CharSet”]=>
    string(5) “UTF-8″
    [“ContentType”]=>
    string(10) “text/plain”
    [“Encoding”]=>
    string(4) “8bit”
    [“ErrorInfo”]=>
    string(43) “SMTP Error: Could not connect to SMTP host.”
    [“From”]=>
    string(20) “bsfxdesign@gmail.com”
    [“FromName”]=>
    string(23) “WEBSITE-CONTACT US FORM”
    [“Sender”]=>
    string(0) “”
    [“Subject”]=>
    string(56) “WP Mail SMTP: Test mail to graham.fox@imagicsoftware.com
    [“Body”]=>
    string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
    [“AltBody”]=>
    string(0) “”
    [“WordWrap”]=>
    int(0)
    [“Mailer”]=>
    string(4) “smtp”
    [“Sendmail”]=>
    string(18) “/usr/sbin/sendmail”
    [“PluginDir”]=>
    string(0) “”
    [“Version”]=>
    string(5) “2.0.4”
    [“ConfirmReadingTo”]=>
    string(0) “”
    [“Hostname”]=>
    string(0) “”
    [“MessageID”]=>
    string(0) “”
    [“Host”]=>
    string(14) “smtp.gmail.com”
    [“Port”]=>
    string(3) “465”
    [“Helo”]=>
    string(0) “”
    [“SMTPSecure”]=>
    string(3) “ssl”
    [“SMTPAuth”]=>
    bool(true)
    [“Username”]=>
    string(20) “bsfxdesign@gmail.com”
    [“Password”]=>
    string(8) “xxxxxxxxx”
    [“Timeout”]=>
    int(10)
    [“SMTPDebug”]=>
    int(2)
    [“SMTPKeepAlive”]=>
    bool(false)
    [“SingleTo”]=>
    bool(false)
    [“smtp”]=>
    object(SMTP)#174 (7) {
    [“SMTP_PORT”]=>
    int(25)
    [“CRLF”]=>
    string(2) ”

    [“do_debug”]=>
    int(2)
    [“do_verp”]=>
    bool(false)
    [“smtp_conn”]=>
    resource(134) of type (stream)
    [“error”]=>
    NULL
    [“helo_rply”]=>
    string(139) “250-mx.google.com at your service, [74.213.170.37]
    250-SIZE 35651584
    250-8BITMIME
    250-AUTH LOGIN PLAIN XOAUTH
    250 ENHANCEDSTATUSCODES

    }
    [“to”]=>
    array(1) {
    [0]=>
    array(2) {
    [0]=>
    string(29) “graham.fox@imagicsoftware.com”
    [1]=>
    string(0) “”
    }
    }
    [“cc”]=>
    array(0) {
    }
    [“bcc”]=>
    array(0) {
    }
    [“ReplyTo”]=>
    array(0) {
    }
    [“attachment”]=>
    array(0) {
    }
    [“CustomHeader”]=>
    array(0) {
    }
    [“message_type”]=>
    string(5) “plain”
    [“boundary”]=>
    array(2) {
    [1]=>
    string(35) “b1_33adcc17bd5a4233278d92d3dc5cd556″
    [2]=>
    string(35) “b2_33adcc17bd5a4233278d92d3dc5cd556″
    }
    [“language”]=>
    array(13) {
    [“mailer_not_supported”]=>
    string(25) ” mailer is not supported.”
    [“provide_address”]=>
    string(55) “You must provide at least one mailer is not supported.”
    [“execute”]=>
    string(19) “Could not execute: ”
    [“instantiate”]=>
    string(36) “Could not instantiate mail function.”
    [“authenticate”]=>
    string(35) “SMTP Error: Could not authenticate.”
    [“from_failed”]=>
    string(35) “The following From address failed: ”
    [“data_not_accepted”]=>
    string(30) “SMTP Error: Data not accepted.”
    [“recipients_failed”]=>
    string(56) “SMTP Error: The following SMTP Error: Data not accepted.”
    [“connect_host”]=>
    string(43) “SMTP Error: Could not connect to SMTP host.”
    [“file_access”]=>
    string(23) “Could not access file: ”
    [“file_open”]=>
    string(33) “File Error: Could not open file: ”
    [“encoding”]=>
    string(18) “Unknown encoding: ”
    [“signing”]=>
    string(15) “Signing Error: ”
    }
    [“error_count”]=>
    int(2)
    [“LE”]=>
    string(1) ”

    [“sign_cert_file”]=>
    string(0) “”
    [“sign_key_file”]=>
    string(0) “”
    [“sign_key_pass”]=>
    string(0) “”
    }

    The SMTP debugging output is shown below:

    SMTP -> FROM SERVER:
    220 mx.google.com ESMTP c9sm194637vcs.31
    SMTP -> FROM SERVER:
    250-mx.google.com at your service, [74.213.170.37]
    250-SIZE 35651584
    250-8BITMIME
    250-AUTH LOGIN PLAIN XOAUTH
    250 ENHANCEDSTATUSCODES
    SMTP -> ERROR: Password not accepted from server: 535-5.7.1 Username and Password not accepted. Learn more at
    535 5.7.1 http://mail.google.com/support/bin/answer.py?answer=14257 c9sm194637vcs.31

    SMTP -> FROM SERVER:
    250 2.1.5 Flushed c9sm194637vcs.31

    • I think the relevant error is “Password not accepted from server”. It seems like the username or password is not being accepted by Google’s mail server. Can you double check that info or try with a different account or mail server?

  32. Hey Callum thanks for your plugin.

    I’m having a bit of a problem, I have set it up exactly how you say in your screen shot but I am getting the following error, please help!

    Test Message Sent

    The result was:

    bool(false)

    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Connection refused (111)

    • Please, please, please, read the plugin page. This is the single most common error that is reported here. It has been asked and answered many, many times and it’s addressed in the very text of the page.

      • Hey,
        I’m really sorry, it must be so frustrating for you getting the same question over and over. Is the bit you are refering to this bit:
        “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.”

        I’m still really new to wordpress and all this stuff and am not particularly technical, this doesn’t mean much to me.

        I’ve looked at the error message and can’t make much sense of it. I’ve had a look in the php.ini file but I don’t really know what i’m looking for and i’m positive the SMTP host is correct (its exactly the same as yours for gmail).

        Sorry for being a newbie.
        Thanks for your help!

        Alex

        • If php.ini and fopen() settings don’t mean anything to you, my best advice is to contact your server administrator. I can say with 98% confidence that the issue lies with your host. The plugin is being used by a sufficient number of people on different servers that I’m confident this issue is not one with the code. Your host will most likely have to change some kind of php setting. If they do so, and it works, please post back here with your success. I’ve never personally seen this error, so I’m not sure what settings need to be changed on the server, I’d be interested to know.

      • sorry to keep posting like this, but is there anything I can do to edit my php.ini file that will solve the problem?

        If I do have to email godaddy what exactly should I be saying?

        Sorry for all the questions I really am a noob. lol
        Thanks

        Alex

        • In a couple of minutes of searching the history, I’ve found maybe a dozen people with problems on GoDaddy. They usually resort to using GoDaddy’s outgoing SMTP server. I’m guessing GoDaddy do not allow you to send mail directly to external servers. I recommend you email them and explain your problem. Tell them you’re trying to send emails from WordPress and it’s not working. Ask them what SMTP settings you should use. Then put those into the plugin. Please try to avoid over posting here, it clutters the page and makes it harder for other people to find answers.

          • Sorry to keep cluttering up the page but I still haven’t managed to fix it.

            I email GoDaddy and they replied saying that I needed to use relay-hosting.secureserver.net as the SMTP host and use port 25. This now gives me this error:

            The SMTP debugging output is shown below:
            SMTP -> ERROR: Failed to connect to server: (0)

            Any ideas? I shall email them again and see what they say.
            Thanks for your help.

            • For anyone who has this problem in the future, according to their phone support they do not allow gmail accounts. Therefore I had to create my own email (you get some free with the hosting) and use that.
              The setting I used were as follows:
              smtp host: relay-hosting.secureserver.net
              no port
              no encryption
              no smtp auth
              Hope this helps.

              Alex

  33. Callum,

    Thank you for your terrific plugin!

    I am having a problem, similar to Noyse above but slightly different.

    I have configured your plug into use gmails smtp server with: SSL encryption and authentication.

    When an email is sent, it over rides the submitters email address from the form field and uses my gmail account username instead.
    Example:
    Imagine these are my settings:

    From Email: donotreply@gmail.com

    You can specify the email address that emails should be sent from. If you leave this blank, the admin email will be used.

    From Name: Jimmy Two-Times

    You can specify the name that emails should be sent from. If you leave this blank, the emails will be sent from WordPress.

    Mailer
    Send all WordPress emails via SMTP.

    SMTP Options
    These options only apply if you have chosen to send mail by SMTP above.

    SMTP Host: smtp.gmail.com
    SMTP Port: 465

    Encryption:

    Use SSL encryption.

    Authentication:

    Yes: Use SMTP authentication.

    Username: donotreply@gmail.com
    Password: xxxxxxx

    So if someone named Jim using his email address “jim@foobar.com” sent me a message, and I get the message and hit reply, I expect to see Jim “jim@foobar.com” in the To portion of my email. Instead I see Jim “donotreply@gmail.com”

    It appears that sending the email through gmails settings is over-writing the users [your-email] setting.

    Can you help?

    • Please read the history, this question has been asked and answered previously. I believe this is caused by Gmail, it’s part of their mail setup.

  34. Hi, thanks for your plugin, but when installing it on WP 3.0 I get this error:

    “The plugin generated 186 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.”

    Any idea?

    • Thanks for sharing this. I’ve seen this error before. The plugin still works fine, I’m really not sure what’s causing the issue. I’m trying to look into it.

      • What a GREAT plug-in! I just wanted to verify that I too am experiencing this issue. I’m on WP3.01 fresh install. In fact yours is the only plug-in , and first plug-in, I activated this afternoon for the new site I am building. I don’t know if the theme matters (I’m not a coder), but I am only using the 2010 theme at this point. Hope this helps in some way.

        • Thanks for the feedback, and thank you kindly for the *very* generous donation. I think it outweighs the total of all other donations ever!

          I can’t figure out what causes that error. It’s triggered because one function is declared twice. The only reason I can see for that is that the plugin file is included twice, which would be a bug in WordPress. I’ll take some time to look into it more closely over the next few days. I believe the plugin works fine after activation, the error can be safely ignored.

          • Yes, I can confirm it works perfectly despite the warning message. You’ll be getting the same donation for each site I use your plug-in on. Seems only right given the time and expense it takes to build / support something like this. Cheers!

  35. Hi Callum, and thanks for your excellent WP plugin!

    I installed 0.8.6 with WP 3.0, set the “From Email” and “From Name” and the other various fields for my SMTP server. The emails work, but the “From Email” seems to be ignored, using the default admin email instead.

    I was hoping to have emails from this WP site use a simple “noreply@mydomain.com” email address instead of the admin email address. Oddly, the “From Name” I set in WP Mail SMTP is being picked up and used, but not the “From Email” address.

    Any ideas?

    Thanks,
    Rick

    • Hmm, I’m puzzled. I’ve run some tests and it works on my site WP 3.0 and 0.8.6. I’ll send you a slightly modified version now with more debugging output, can you send me back the results?

      • Ok, based on the results of our email chatter, there must be something else changing the from address before it gets to this plugin. The plugin is not changing the address because it has already been changed from the default (which is wordpress@yoursitename.com).

        Try disabling all other plugins, then see if it works. If that does work, try re-enabling plugins one at a time, sending a test mail between each one. Then you can hopefully pin down which other plugin is affecting the from email address.

  36. Hi there,

    I’m having some problems with the plugin. I’m using WP Multisite 3. It works fine on the top level (main site) but as soon as I add another site the Email function is added to the Settings menu – but all the settings are blank. I added the settings to wp-config.php in the root as well – but this doesn’t change anything (and the menu remains visible as well)

    All the sites that are created can not send mail (unless I edit the settings manually)

    Any ideas?

    • Do you have define('WPMS_ON', true); somewhere in your wp-config.php file? With that constant set, the admin page should not appear anywhere.

      Can you send me a copy of your wp-config.php file? Please remove all the passwords and other personal data.

        • Your wp-config.php looks good. Not sure what that notify.php files is, it doesn’t seem connected to me. Have you activated the plugin so it’s automatically enabled across all blogs? I’m struggling to think of what’s causing the issue. You only have one, single wp-config.php file, correct?

          Please use the reply button below this comment to reply, keeps all the messages connected. Thanks. :-)

          • Hi Callum,

            I have activated the plugin. I tried putting it in /wp-content/plugins and then activated it, tried network activating it and also tried putting it in /wp-content/mu-plugins/ – none of the options worked.

            I only have one wp-config.php file.

            I included the notify because I found this line in it:

            $ok = wp_mail( $email_to, $email_subject, $email_message, $headers );

            • Sharky, please use the “reply” link to post your responses. On the comment page underneath each comment there’s a link that says “reply”. That causes the comment to be logged as a reply to my message instead of starting a new thread. Do you understand what I mean?

              Are you using subdomains or subdirectories for the sites? I’ve just installed a test site on my dev server and the Email menu disappears everywhere after I add the WP Mail SMTP settings to wp-config.php. I’m not sure what else to suggest.

              • Iunderstand. I am using subdomains. The email menu has actually disappeared now – but it is still not sending mail from the subdomains.

                    • I got your message. I suggest you try the following. Write a post on a subdomain site. Enable notification of comments in WordPress core. Then post a comment (not logged in, or as another user) on that post. This will test sending emails from within WordPress itself, rather than by your theme. Hopefully you’ll discover whether the problem lies in WordPress itself or in a theme / plugin.

                    • Ok, I just created another plugin that will create an Email Test admin page that just allows you to send an email test. Get the file here, rename it to .php and then activate it. Then try sending a test mail from sub domain sites. You’ll then have access to the debugging info.

                  • This is bizarre – I actually get the mail!

                    This is a test email generated by the WP Mail SMTP WordPress plugin.

                    • Then I think the problem lies somewhere else, not with the plugin. I’m not sure what to suggest.

                    • No problem. I’ll look further.. thank you very much for the quick support and your efforts.

  37. It defenetly stoped working after upgrading to wordpress 3.0.1

    I tested this on a blog, that still runs on WP 3.0 and it works

    So we need an update of this for WP 3.0.1

      • Callum,

        I’ve encountered the same problem. Plugin works fine on one blog that is running older version of WP. Another blog that has been updated to 3.0.1, I used the same exact config but the test messages fail (timeout). It’s configured to relay through Gmail. Please advise.

        • You upgraded from 3.0 to 3.0.1 and now you’re seeing an error? If you downgrade to 3.0 again, does that resolve the problem?

  38. Since I did the upgrade to version 3.0.1 wordpress plugin wp-email-smtp send email stopped and when I try to send a test email I get the error message of Next Step:

    Test Message Sent

    The result was:

    bool(false)

    The full debugging output is shown below:

    object(PHPMailer)#4093 (45) {
    ["Priority"]=>
    int(3)
    ["CharSet"]=>
    string(5) "UTF-8"
    ["ContentType"]=>
    string(10) "text/plain"
    ["Encoding"]=>
    string(4) "8bit"
    ["ErrorInfo"]=>
    string(43) "SMTP Error: Could not connect to SMTP host."
    ["From"]=>
    string(21) "aaa@bbb.com"
    ["FromName"]=>
    string(22) "Contato"
    ["Sender"]=>
    string(0) ""
    ["Subject"]=>
    string(58) "WP Mail SMTP: Test mail to aaa@aaa.com"
    ["Body"]=>
    string(68) "This is a test email generated by the WP Mail SMTP WordPress plugin."
    ["AltBody"]=>
    string(0) ""
    ["WordWrap"]=>
    int(0)
    ["Mailer"]=>
    string(4) "smtp"
    ["Sendmail"]=>
    string(18) "/usr/sbin/sendmail"
    ["PluginDir"]=>
    string(0) ""
    ["Version"]=>
    string(5) "2.0.4"
    ["ConfirmReadingTo"]=>
    string(0) ""
    ["Hostname"]=>
    string(0) ""
    ["MessageID"]=>
    string(0) ""
    ["Host"]=>
    string(14) "smtp.gmail.com"
    ["Port"]=>
    string(3) "465"
    ["Helo"]=>
    string(0) ""
    ["SMTPSecure"]=>
    string(3) "ssl"
    ["SMTPAuth"]=>
    bool(true)
    ["Username"]=>
    string(23) "aaa@bbb.com"
    ["Password"]=>
    string(8) "*******"
    ["Timeout"]=>
    int(10)
    ["SMTPDebug"]=>
    int(2)
    ["SMTPKeepAlive"]=>
    bool(false)
    ["SingleTo"]=>
    bool(false)
    ["smtp"]=>
    object(SMTP)#4094 (7) {
    ["SMTP_PORT"]=>
    int(25)
    ["CRLF"]=>
    string(2) "
    "
    ["do_debug"]=>
    int(2)
    ["do_verp"]=>
    bool(false)
    ["smtp_conn"]=>
    bool(false)
    ["error"]=>
    array(3) {
    ["error"]=>
    string(27) "Failed to connect to server"
    ["errno"]=>
    int(110)
    ["errstr"]=>
    string(20) "Connection timed out"
    }
    ["helo_rply"]=>
    NULL
    }
    ["to"]=>
    array(1) {
    [0]=>
    array(2) {
    [0]=>
    string(31) "aaa@aaa.com"
    [1]=>
    string(0) ""
    }
    }
    ["cc"]=>
    array(0) {
    }
    ["bcc"]=>
    array(0) {
    }
    ["ReplyTo"]=>
    array(0) {
    }
    ["attachment"]=>
    array(0) {
    }
    ["CustomHeader"]=>
    array(0) {
    }
    ["message_type"]=>
    string(5) "plain"
    ["boundary"]=>
    array(2) {
    [1]=>
    string(35) "b1_baec03357435dd94d569be6c239b8cfb"
    [2]=>
    string(35) "b2_baec03357435dd94d569be6c239b8cfb"
    }
    ["language"]=>
    array(13) {
    ["mailer_not_supported"]=>
    string(25) " mailer is not supported."
    ["provide_address"]=>
    string(55) "You must provide at least one mailer is not supported."
    ["execute"]=>
    string(19) "Could not execute: "
    ["instantiate"]=>
    string(36) "Could not instantiate mail function."
    ["authenticate"]=>
    string(35) "SMTP Error: Could not authenticate."
    ["from_failed"]=>
    string(35) "The following From address failed: "
    ["data_not_accepted"]=>
    string(30) "SMTP Error: Data not accepted."
    ["recipients_failed"]=>
    string(56) "SMTP Error: The following SMTP Error: Data not accepted."
    ["connect_host"]=>
    string(43) "SMTP Error: Could not connect to SMTP host."
    ["file_access"]=>
    string(23) "Could not access file: "
    ["file_open"]=>
    string(33) "File Error: Could not open file: "
    ["encoding"]=>
    string(18) "Unknown encoding: "
    ["signing"]=>
    string(15) "Signing Error: "
    }
    ["error_count"]=>
    int(1)
    ["LE"]=>
    string(1) "
    "
    ["sign_cert_file"]=>
    string(0) ""
    ["sign_key_file"]=>
    string(0) ""
    ["sign_key_pass"]=>
    string(0) ""
    }

    The SMTP debugging output is shown below:

    SMTP -> ERROR: Failed to connect to server: Connection timed out (110)

    • This is the most common error message reported. If you want to test version 3.0.1 against 3.0, try downgrading back to 3.0 and see if anything changes. I upgraded to 3.0.1 specifically to test your problems. The plugin works fine here on 3.0.1.

  39. Now the same problem, I q is the host, because I find no fault.

    Thanks for answer, a greeting.

    A’m haceindo the translation of the plugin at (pt_BR) Portuguese of Brazil, where it has left uma msg here.

    • I don’t fully understand your message. Are you making a Brazilian Portugese translation of the plugin? I’ll be happy to include it in the next release if you are.

      Did you get email working on your sites?

  40. We have a site where we get this error in our server logs when running Contact Form 7
    PHP Fatal Error: Class ‘wpMailPlugin’ not found in ….wpcontent/plugins/wp-mailinglist/helpers/form.php

    We used to have your plugin installed but removed it. Obviously WP still thinks its there. How do we remove your plugin entirely?

    • This plugin is called WP Mail SMTP and wpMailPlugin is nothing to do with it. This plugin is unrelated to the error message you’ve posted.

  41. Hi Callum I just have a quick question it is this when I isntall your plugin the test e-mail works but when I try to call it to my site with the wp_mail() command noting happens at all :S I do not know what to do

    • What result do you get back from wp_mail(). I believe it returns true if the mail was sent. Are you trying to send to the same address as with the test mail function? The test function simply calls wp_mail() with a simple email and the address you enter. It sounds like you need to debug your PHP script which is a little beyond the scope of the support I provide here.

        • You need to debug the PHP script. I’m not wiling to help any further. If you find a specific bug with this plugin, please report it here. Otherwise, I do not understand enough about your situation to help. I’m happy to help if you have a problem with this plugin, but debugging your PHP scripts is beyond the support I want to provide here. Best of luck with your code.

    • Sorry for the slow response. If you want it installed across your whole site, put it in mu-plugins and set the constants in wp-config.php.

  42. Hi,

    Great plug in,my only comment is would it be possible to write the code to hash out the email smtp password once you click update settings. I don’t really like the idea of having it in plain text for any admin who logs on to see. would it be possible to write the password to the config file and then clear the box or fill it with ******* so it is no longer readable?

    Apart from that a great plug in….

    • You make an excellent point. If you write all the info to wp-config.php the admin page will disappear and the password will not be visible to blog admins. This is the best option from a security standpoint. There is currently no option to write just the password to wp-config.php with the rest set through wp-admin. I don’t see any benefit in that.

      I’ll add something recommending this as providing greater security.

  43. Hi,

    I’m newby with WordPress also with Contact 7 and WP_mail.

    I’m using the up to date version of each one.

    But after 3 tries of install and reinstall contact 7 and Wp_mail it doesn’t work !!!!

    The configuration page at my wordpress admistration page doesn’t came alive.
    So I can’t do anything to adjust SMTP and so on that I need to do.

    I saw taht I must to change from mail() to wp_mail() elsewhere. But, if it’s the case here, please tell me where???

    Please Help!!!!!!!!!!!!!!!

    Thanks in advance,
    Eduardo

    • I don’t fully understand your problem.

      Question 1: Can you see the admin page under Settings > Email?

      Question 2: Can you send a test mail from that admin page?

      If other plugins use the mail() function, they will ignore this plugin. You can usually replace mail() with wp_mail() and it will “just work”.

    • Darn, I used to keep a copy here, but it was a pain hosting both. Nope, no changes on my end. I think Automattic are working on WordPress.org during this 3 month period. I see some changes there. Maybe they fudged something. I see a download link and just successfully downloaded the plugin (both logged in and not). Can you get it now? I’ll email you a copy of the plugin anyway in case you’re still having issues.

      • It’s back now, just downloaded a copy. Thank you!
        Yesterday there was only a red line instead of the download button, no screenshot, no faq, no changelog…
        I suppose you are right, automattic is working on wordpress.org.

        BTW, rating is back on…so 5 stars to your work.
        Thank you!

  44. Am using the smtp mail plugin and noticed this:

    Concerning the ‘From Email’ field, no matter what I put in this field the emails show up as from the contents of the ‘Username field’. I did some experimenting and found that if I use an SMTP account that does not require encryption it works properly, but the accounts that have encryption it seems like the ‘From Email’ field is bypassed or ignored.

    This may be how it has to work but let me know.

    • Thanks for sharing your feedback. As I read the code, there’s no connection between the From email address and the options to use encryption. Have you observed this behaviour on multiple SMTP servers? I believe that Gmail for example forces the From address to be the Gmail address, I assume to reduce spam. Is the mail server you’re using doing something similar perhaps?

  45. Callum,

    First off thanks for the plugin, works great!

    A suggestion just from my experience enabling the wpms version. In the docs you may want to mention that the constants need to be defined above the line that says

    /* That’s all, stop editing! Happy blogging. */

    If it’s copied after that, it doesn’t work and people may have the tendency to just copy and paste at the bottom.

    I was also curious why you went with defining the constants in wp-config and having no admin page at all, rather than just adding the options under Super Admin? Seems like that may be easier for the end user.

    Thanks again for a great plugin and hard work.

    • That’s an excellent suggestion. I added the constant option because I think it boosts performance (albeit probably in a tiny, tiny way!) by not relying on wp_options. Your suggestion to add a Super Admin menu and set the options across the whole site is a good one. Likewise, the point about adding above that line is critical. I’ll most likely incorporate these ideas into the next release. Thanks for sharing.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>