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,094 thoughts on “WP Mail SMTP v0.8

  1. Using WP Mail SMTP 0.9.1

    We have set up both the forms and the default settings with a legitimate default email address. However, the emails, when sent, using the form OR the test page, always send without a from name or email address. Quite literally, the debug log from the plugin page shows

    “["From"]=>
    NULL
    ["FromName"]=>
    NULL

    Watching my SMTP server logs show successful authentication by the plugin, but blank email address and name as well.

    What/where should I be checking to get to the bottom of this?

    • Is it a MultiSite install? Have you set the options via the options page or via wp-config.php? What happens if you empty the from / from name settings? That should fall back to the defaults of WordPress and wordpress@domain.tld. What OS / web server / PHP version are you running?

      • It is a single site install.
        I’m configuring it via the options page in WP.
        If I leave the from fields empty on the options page in WP, I still get the email with “null” for the from and from address at the server.
        The Web server is hosted by http://www.cartikahosting.com/ and is a linux server. PHP 5.2.17

        • I have tried using authenticated login to both an Exchagne 2010 server and a server running SmarterMail for the email server, and I get the same results from both.

        • Interesting, I’m not sure what’s going on here. You still get no from name or email in the test mail function, if you leave those fields blank? Sounds like something quite strange is going on. Try using the wp_mail_log plugin, it might shed some light on the situation. Please delete the log file after you’ve used it.

          • What should I be looking for? I can send you the whole log privately if that would help.

            The only reference to “from” that I see is in these lines:

            array (
            ‘date’ => ‘Tue, 03 Jul 2012 22:09:45 +0000′,
            ‘args’ =>
            PHPMailer::__set_state(array(
            ‘Priority’ => 3,
            ‘CharSet’ => ‘UTF-8′,
            ‘ContentType’ => ‘text/plain’,
            ‘Encoding’ => ’8bit’,
            ‘ErrorInfo’ => ”,
            ‘From’ => NULL,
            ‘FromName’ => NULL,
            ‘Sender’ => ”,
            ‘Subject’ => ‘WP Mail SMTP: Test mail to email@address.com‘,
            ‘Body’ => ‘This is a test email generated by the WP Mail SMTP WordPress plugin.’,

            (where of course email@addres.com is my real email address).

            • I also wanted to point out, if this helps, when I tried my email server(s) (Exchange 2010 and Smartermail 4) I have the null sender problem. When I tried my ISP’s email server (which first goes through a Barracuda spam filter and then to a Linux server) I get the null sender problem. But if I use Gmail, then the from line shows the address of the account I’m authenticating with to Gmail, but not the from address specified in the config in WP_mail. For what that is worth.

            • Please send the log by email and I’ll take a look. Gmail automatically sets some part of the sender address I believe, so that’s probably why you’re seeing different behaviour there.

  2. I installed the plugin and the built in test works fine, but no emails are being sent for anything else. No emails for user comments, contact forms or other plugins. I have tried different email addresses. Any idea where the problem is? I’m having this problem on two wordpress sites.

  3. Hello and thank you for your plugin,

    We’ve been using it for single sites and just trying it out on a multisite/subfolders.
    You mention “if using the plugin on a multi-site setup, put your settings in wp-config.php and then disable the admin menu.”
    I have not the slightest idea on what to put on the config.php and how to disable the admin menu for individual sites. Can you please elaborate? Preferably with an example.

    Thanks again

      • Thank you.
        So actually. Copy lines 26-36 and change them like:
        WPMS_MAIL_FROM’, ‘From Email –>myemail@mysite.com
        or
        WPMS_MAIL_FROM_NAME’, ‘From Name –>MyName
        After that leave the plugin enabled, BUT how do I “disable the admin menu”? Do I have to put some code someplace?

        • You can put the plugin in mu-plugins if you prefer. The plugin is automatically disabled if you activate it via options in wp-config.php. I don’t understand your question about how to modify the lines, it’s PHP code, so I suggest you have a PHP programmer assist you if required.

  4. Can you tell me what this debug message means? I received it while trying to setup the plugin to work with my GoDaddy hosted website.

    SMTP -> FROM SERVER:220 p3nlsmtp11.shr.prod.phx3.secureserver.net ESMTP

    SMTP -> FROM SERVER: 250-p3nlsmtp11.shr.prod.phx3.secureserver.net hello [97.74.24.205], secureserver.net
    250-HELP
    250-SIZE 31457280
    250-8BITMIME
    250-STARTTLS
    250 OK

    SMTP -> FROM SERVER:250 ok

    SMTP -> FROM SERVER:250 ok

    SMTP -> FROM SERVER:354 enter mail, end with “.” on a line by itself

    SMTP -> FROM SERVER:250 gKdj1j00N4RWBSR01:4GH:Message dropped for spam or virus content

    • This is the relevant section “Message dropped for spam or virus content”. I’d suggest asking GoDaddy if it’s their SMTP server you’re using.

  5. I have been having an ongoing issue with email notifications for a while now and have not been able to fix this. I have installed your plugin and it seems to work okay for a few and then when I go to check it the next day it’s not working again. The forms are working fine but the email notifications are not being sent out. I have contacted GoDaddy to see if everything is working fine on their end and they assured me that it is. Any help would be much appreciated!!

    • It’s highly unlikely that the plugin itself, or indeed WordPress, is changing behaviour from one day to the next. When you say “not working”, what specifically do you mean? Are there any error messages generated? What happens when you send a test mail if it’s “not working”?

      • When a form has been submitted by the user, they still receive the message on the website that says “thank you for your order” and their order is being placed. So all of that is working fine. But the email notifications that are supposed to be sent to the user AND to the administrator are not being sent out. This started happening about 2.5 weeks ago so I installed your plugin to fix this problem.

        Unfortunately, I can’t seem to fix this, even with your plugin. So I’m not sure if there is something I am missing? I have a screenshot of the test mail message. Is there anyway I could send that to you? Or maybe give you my login and password for wordpress and have you take a look?

  6. I’m using GravityForms for several forms on my site. I am hosting with DreamHost and our email uses gmail aps. 98% of the time, all the notifications from GravityForms are received. But the user complains that sporadically, some notifications are not arriving. We use several different email addresses for the different forms, all using the site domain name. BTW, I have installed the email log plugin.

    In the hopes of stopping the sporadic non-delivery of notifications, I have installed your WP Mail SMTP plugin. Since the problem is sporadic, it is impossible to test for, so I want to make sure I have everything set up correctly. I used all the gmail parameters you recommended.

    My question is this: Since my various forms use different from addresses, will the plugin affect all form notifications, or will it only affect the email sent from the primary address I specify in the plugin settings? If the latter, do I then have to specify the same from address for all my GravityForms?

    Many thanks for your time.
    Devra

    • The plugin will affect all messages sent via the wp_mail() function, so anything that’s logged by the WP Mail Log plugin. However, it will only modify the from name and email if they are the original WordPress and wordpress@domain.tld. So if your form plugin changes the from name and address and uses wp_mail() then the emails should be successfully sent via your SMTP server.

      Could the intermittent failures be flagged as spam?

    • If the plugins you’re using send their messages with the wp_mail() function, then they will be routed via the SMTP settings you specified. If the test mail function works, then the plugin is operating normally, in which case, the issue lies with the plugin that generates the message.

  7. Hi.
    I wish the password field on the admin page was a instead of a “text” as it is now. I dont want other admins to see the password to my stmp server.

    //Tobias

    • This is a fundamental misunderstanding of how password fields work, and this question has been asked and answered many times before. Even if the field was type=”password”, the password would still be visible in the source code of the page, or directly on the /options.php page. There is no way to encrypt the password because it must be used in plain text when connecting to the server. Therefore, it is better that the password be displayed in clear text so that the user is aware that there is no security in place.

      • I couldn’t disagree with you more. You are saying instead of “kind of hide” the password you show it completely…? Do it properly then!

        Leave the password field blank. The fact is: I don’t want to openly show my password to anyone…

        But, it is you plugin and you do whatever you like….

        • The choice is either to pretend the password is stored securely or to be upfront that it’s totally insecure. I chose the latter. If you want the password saved more safely, put it into your wp-config.php file.

  8. theese error appears ….
    The SMTP debugging output is shown below:

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

    SMTP Error: Could not connect to SMTP host.
    …..

    sir,………….. what i do ?

  9. Thanks for a great plugin. Does it work with Microsoft Exchange email addresses? I have a client that has uses Exchange, but I’m not at all familiar with it. If the plugin works with Exchange, can you tell me where to get the settings in Exchange to use in WP Mail SMTP?

  10. I’ve got WP 3.4.1, and WP mail SMTP. I cannot send ANYTHING, eventhoug I’ve got the log:

    The result was:
    bool(true)

    A full log is here:

    Test Message Sent
    The result was:
    bool(true)
    The full debugging output is shown below:
    object(PHPMailer)#4368 (58) {
    ["Priority"]=>
    int(3)
    ["CharSet"]=>
    string(5) “UTF-8″
    ["ContentType"]=>
    string(10) “text/plain”
    ["Encoding"]=>
    string(4) “8bit”
    ["ErrorInfo"]=>
    string(53) “The following From address failed: padis777@gmail.com
    ["From"]=>
    string(18) “padis777@gmail.com”
    ["FromName"]=>
    string(26) “Konkurs Młodzi Przywódcy”
    ["Sender"]=>
    string(18) “padis777@gmail.com”
    ["Subject"]=>
    string(51) “WP Mail SMTP: Test mail to adrian.nowosz@interia.pl
    ["Body"]=>
    string(68) “This is a test email generated by the WP Mail SMTP WordPress plugin.”
    ["AltBody"]=>
    string(0) “”
    ["MIMEBody":protected]=>
    string(69) “This is a test email generated by the WP Mail SMTP WordPress plugin.

    ["MIMEHeader":protected]=>
    string(496) “Date: Fri, 12 Oct 2012 13:35:05 +0000
    Return-Path: padis777@gmail.com
    To: adrian.nowosz@interia.pl
    From: =?UTF-8?Q?Konkurs_M=C5=82odzi_Przyw=C3=B3dcy?=
    Subject: WP Mail SMTP: Test mail to adrian.nowosz@interia.pl
    Message-ID:
    X-Priority: 3
    X-Mailer: PHPMailer 5.2.1 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
    MIME-Version: 1.0
    Content-Transfer-Encoding: 8bit
    Content-Type: text/plain; charset=”UTF-8″


    ["SentMIMEMessage":protected]=>
    string(569) “Date: Fri, 12 Oct 2012 13:35:05 +0000
    Return-Path: padis777@gmail.com
    To: adrian.nowosz@interia.pl
    From: =?UTF-8?Q?Konkurs_M=C5=82odzi_Przyw=C3=B3dcy?=
    Subject: WP Mail SMTP: Test mail to adrian.nowosz@interia.pl
    Message-ID:
    X-Priority: 3
    X-Mailer: PHPMailer 5.2.1 (http://code.google.com/a/apache-extras.org/p/phpmailer/)
    MIME-Version: 1.0
    Content-Transfer-Encoding: 8bit
    Content-Type: text/plain; charset=”UTF-8″

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

    ["WordWrap"]=>
    int(0)
    ["Mailer"]=>
    string(4) “smtp”
    ["Sendmail"]=>
    string(18) “/usr/sbin/sendmail”
    ["PluginDir"]=>
    string(0) “”
    ["ConfirmReadingTo"]=>
    string(0) “”
    ["Hostname"]=>
    string(0) “”
    ["MessageID"]=>
    string(0) “”
    ["Host"]=>
    string(14) “smtp.gmail.com”
    ["Port"]=>
    string(3) “587″
    ["Helo"]=>
    string(0) “”
    ["SMTPSecure"]=>
    string(3) “ssl”
    ["SMTPAuth"]=>
    bool(true)
    ["Username"]=>
    string(18) “padis777@gmail.com”
    ["Password"]=>
    string(18) “poltheiticilpal120″
    ["Timeout"]=>
    int(10)
    ["SMTPDebug"]=>
    int(2)
    ["SMTPKeepAlive"]=>
    bool(false)
    ["SingleTo"]=>
    bool(false)
    ["SingleToArray"]=>
    array(0) {
    }
    ["LE"]=>
    string(1) ”

    ["DKIM_selector"]=>
    string(9) “phpmailer”
    ["DKIM_identity"]=>
    string(0) “”
    ["DKIM_passphrase"]=>
    string(0) “”
    ["DKIM_domain"]=>
    string(0) “”
    ["DKIM_private"]=>
    string(0) “”
    ["action_function"]=>
    string(0) “”
    ["Version"]=>
    string(5) “5.2.1″
    ["XMailer"]=>
    string(0) “”
    ["smtp":protected]=>
    object(SMTP)#4369 (8) {
    ["SMTP_PORT"]=>
    int(25)
    ["CRLF"]=>
    string(2) ”

    ["do_debug"]=>
    int(2)
    ["do_verp"]=>
    bool(false)
    ["Version"]=>
    string(5) “5.2.1″
    ["smtp_conn":"SMTP":private]=>
    bool(false)
    ["error":"SMTP":private]=>
    array(1) {
    ["error"]=>
    string(37) “Called Mail() without being connected”
    }
    ["helo_rply":"SMTP":private]=>
    NULL
    }
    ["to":protected]=>
    array(1) {
    [0]=>
    array(2) {
    [0]=>
    string(24) “adrian.nowosz@interia.pl”
    [1]=>
    string(0) “”
    }
    }
    ["cc":protected]=>
    array(0) {
    }
    ["bcc":protected]=>
    array(0) {
    }
    ["ReplyTo":protected]=>
    array(0) {
    }
    ["all_recipients":protected]=>
    array(1) {
    ["adrian.nowosz@interia.pl"]=>
    bool(true)
    }
    ["attachment":protected]=>
    array(0) {
    }
    ["CustomHeader":protected]=>
    array(0) {
    }
    ["message_type":protected]=>
    string(5) “plain”
    ["boundary":protected]=>
    array(3) {
    [1]=>
    string(35) “b1_1585261ac24116c427847a831864380f”
    [2]=>
    string(35) “b2_1585261ac24116c427847a831864380f”
    [3]=>
    string(35) “b3_1585261ac24116c427847a831864380f”
    }
    ["language":protected]=>
    array(17) {
    ["provide_address"]=>
    string(54) “You must provide at least one recipient email address.”
    ["mailer_not_supported"]=>
    string(25) ” 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: ”
    ["recipients_failed"]=>
    string(45) “SMTP Error: The following recipients failed: ”
    ["data_not_accepted"]=>
    string(30) “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: ”
    ["smtp_error"]=>
    string(19) “SMTP server error: ”
    ["empty_message"]=>
    string(18) “Message body empty”
    ["invalid_address"]=>
    string(15) “Invalid address”
    ["variable_set"]=>
    string(30) “Cannot set or reset variable: ”
    }
    ["error_count":protected]=>
    int(1)
    ["sign_cert_file":protected]=>
    string(0) “”
    ["sign_key_file":protected]=>
    string(0) “”
    ["sign_key_pass":protected]=>
    string(0) “”
    ["exceptions":protected]=>
    bool(false)
    }
    The SMTP debugging output is shown below:
    SMTP -> ERROR: Failed to connect to server: (0)

    The following From address failed: padis777@gmail.com

    I don’t recive any test message. Please, help me, it’s extreamly important.
    Regards

    • Not sure why you’re getting a “true” result, but here’s the pertinent error message:

      ERROR: Failed to connect to server: (0)

      That’s the single most common error, it’s covered on the main plugin page. Your server config is the issue.

  11. Hello! Your plug-in is very important for AWS EC2 users… I need to use SES service (Amazon SMTP) for a multisite installation. I configured the plug-in for the whole multsite (via wp-config.php) and it works for every e-mail except for the notification of registration… Can you help me to solve this? Thank you!

    • Check out the wp-mail-log plugin, it’ll give you a better idea of what’s going on under the hood. Can you spot any differences between the messages that are being delivered and the ones that are not? I believe that SES has some tight restrictions on what addresses it will send from, so maybe something’s cropping up that way. Do SES provide any kind of error logs?

      • wp-mail-log solved the problem. WPMU sends e-mail on the network administrator behalf, and not the subsite’s admin. That was the problem. I can confirm wp-mail-smtp works correctly. Perhaps you could add this note on the next release, just before the config.php defines. :-)

        One note: setting define(‘WPMS_MAIL_FROM’, ‘somehing@aws-ses-authorized.xxx’); in wp-config.php confused me since I thought it was the From field, whereas now I understand it is the From field just of the Test e-mail. Is it useful to define it in wp-config.php, if the web interface is removed with define(‘WPMS_ON’, true); thus prohibiting the sending of test e-mails?

        Anyway thank you very much!

        • The WPMS_MAIL_FROM setting is not for the test email, it’s for any email that is sent by WordPress without modifying the From address. WP sends emails from wordpress@domain.tld, but for example, comment notifications are sent from the poster’s email address, so one can reply directly to the person who posted. It doesn’t make sense to override the from field in that case.

          If WPMU is sending emails from a different address, as in, not wordpress@domain.tld, then the plugin will not change the from address. I’ll try to explain that more clearly in the documentation.

    • Hi Simone,

      could you please detail how you exactly configured the plugin to work with SES? I tried the same without success; on the same (multisite) WP installation I can work instead with WP SES plugin, so it is not an issue of misconfiguration on the SES side.

      Thank you in advance!

  12. Hello. I want to test you’re plugin but I have this error after send a test :

    The result was:

    bool(true)

    The full debugging output is shown below:

    object(PHPMailer)#4199 (53) {
    ["Priority"]=>
    int(3)
    ["CharSet"]=>
    string(5) “UTF-8″
    ["ContentType"]=>
    string(10) “text/plain”
    ["Encoding"]=>
    string(4) “8bit”
    ["ErrorInfo"]=>
    string(36) “Could not instantiate mail function.”
    ["From"]=>
    string(32) “wordpress@groupe-initiatives.com”
    ["FromName"]=>
    string(21) “Initiatives Formation”
    ["Sender"]=>
    string(0) “”
    ["Subject"]=>
    string(51) “WP Mail SMTP: Test mail to ange.ripouteau@orange.fr
    ["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) “mail”
    ["Sendmail"]=>
    string(18) “/usr/sbin/sendmail”
    ["PluginDir"]=>
    string(0) “”
    ["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)
    ["SingleToArray"]=>
    array(0) {
    }
    ["LE"]=>
    string(1) ”

    ["DKIM_selector"]=>
    string(9) “phpmailer”
    ["DKIM_identity"]=>
    string(0) “”
    ["DKIM_domain"]=>
    string(0) “”
    ["DKIM_private"]=>
    string(0) “”
    ["action_function"]=>
    string(0) “”
    ["Version"]=>
    string(3) “5.1″
    ["smtp":"PHPMailer":private]=>
    NULL
    ["to":"PHPMailer":private]=>
    array(1) {
    [0]=>
    array(2) {
    [0]=>
    string(24) “ange.ripouteau@orange.fr”
    [1]=>
    string(0) “”
    }
    }
    ["cc":"PHPMailer":private]=>
    array(0) {
    }
    ["bcc":"PHPMailer":private]=>
    array(0) {
    }
    ["ReplyTo":"PHPMailer":private]=>
    array(0) {
    }
    ["all_recipients":"PHPMailer":private]=>
    array(1) {
    ["ange.ripouteau@orange.fr"]=>
    bool(true)
    }
    ["attachment":"PHPMailer":private]=>
    array(0) {
    }
    ["CustomHeader":"PHPMailer":private]=>
    array(0) {
    }
    ["message_type":"PHPMailer":private]=>
    string(5) “plain”
    ["boundary":"PHPMailer":private]=>
    array(2) {
    [1]=>
    string(35) “b1_ad86ae797e8227bf63b0e31681089521″
    [2]=>
    string(35) “b2_ad86ae797e8227bf63b0e31681089521″
    }
    ["language":protected]=>
    array(17) {
    ["provide_address"]=>
    string(54) “You must provide at least one recipient email address.”
    ["mailer_not_supported"]=>
    string(25) ” 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: ”
    ["recipients_failed"]=>
    string(45) “SMTP Error: The following recipients failed: ”
    ["data_not_accepted"]=>
    string(30) “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: ”
    ["smtp_error"]=>
    string(19) “SMTP server error: ”
    ["empty_message"]=>
    string(18) “Message body empty”
    ["invalid_address"]=>
    string(15) “Invalid address”
    ["variable_set"]=>
    string(30) “Cannot set or reset variable: ”
    }
    ["error_count":"PHPMailer":private]=>
    int(1)
    ["sign_cert_file":"PHPMailer":private]=>
    string(0) “”
    ["sign_key_file":"PHPMailer":private]=>
    string(0) “”
    ["sign_key_pass":"PHPMailer":private]=>
    string(0) “”
    ["exceptions":"PHPMailer":private]=>
    bool(false)
    }

    Thanks in advance

    • Can you send mail without the plugin? It looks like PHP’s mail() function is disabled on your host. Have you tried sending by SMTP?

        • The error message you posted says the mail() option was selected. Either way, there’s some issue with your server, I suggest contacting your host.

            • bool(true)

              The full debugging output is shown below:

              object(PHPMailer)#4203 (53) {
              ["Priority"]=>
              int(3)
              ["CharSet"]=>
              string(5) “UTF-8″
              ["ContentType"]=>
              string(10) “text/plain”
              ["Encoding"]=>
              string(4) “8bit”
              ["ErrorInfo"]=>
              string(132) “SMTP Error: The following recipients failed: ange.ripouteau@orange.fr

              SMTP server error: Relay rejected for policy reasons.


              ["From"]=>
              string(35) “webmaster.if@groupe-initiatives.com”
              ["FromName"]=>
              string(21) “Initiatives Formation”
              ["Sender"]=>
              string(35) “webmaster.if@groupe-initiatives.com”
              ["Subject"]=>
              string(51) “WP Mail SMTP: Test mail to ange.ripouteau@orange.fr
              ["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) “”
              ["ConfirmReadingTo"]=>
              string(0) “”
              ["Hostname"]=>
              string(0) “”
              ["MessageID"]=>
              string(0) “”
              ["Host"]=>
              string(27) “mail.groupe-initiatives.com”
              ["Port"]=>
              string(2) “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)
              ["SingleToArray"]=>
              array(0) {
              }
              ["LE"]=>
              string(1) ”

              ["DKIM_selector"]=>
              string(9) “phpmailer”
              ["DKIM_identity"]=>
              string(0) “”
              ["DKIM_domain"]=>
              string(0) “”
              ["DKIM_private"]=>
              string(0) “”
              ["action_function"]=>
              string(0) “”
              ["Version"]=>
              string(3) “5.1″
              ["smtp":"PHPMailer":private]=>
              object(SMTP)#4202 (7) {
              ["SMTP_PORT"]=>
              int(25)
              ["CRLF"]=>
              string(2) ”

              ["do_debug"]=>
              int(2)
              ["do_verp"]=>
              bool(false)
              ["smtp_conn":"SMTP":private]=>
              resource(203) of type (stream)
              ["error":"SMTP":private]=>
              array(3) {
              ["error"]=>
              string(29) “RCPT not accepted from server”
              ["smtp_code"]=>
              string(3) “554″
              ["smtp_msg"]=>
              string(36) “Relay rejected for policy reasons.

              }
              ["helo_rply":"SMTP":private]=>
              string(125) “250-mail.groupe-initiatives.com Hello http://www.groupe-initiatives.com ([92.103.27.106]), pleased to meet you
              250-HELP
              250 SIZE

              }
              ["to":"PHPMailer":private]=>
              array(1) {
              [0]=>
              array(2) {
              [0]=>
              string(24) “ange.ripouteau@orange.fr”
              [1]=>
              string(0) “”
              }
              }
              ["cc":"PHPMailer":private]=>
              array(0) {
              }
              ["bcc":"PHPMailer":private]=>
              array(0) {
              }
              ["ReplyTo":"PHPMailer":private]=>
              array(0) {
              }
              ["all_recipients":"PHPMailer":private]=>
              array(1) {
              ["ange.ripouteau@orange.fr"]=>
              bool(true)
              }
              ["attachment":"PHPMailer":private]=>
              array(0) {
              }
              ["CustomHeader":"PHPMailer":private]=>
              array(0) {
              }
              ["message_type":"PHPMailer":private]=>
              string(5) “plain”
              ["boundary":"PHPMailer":private]=>
              array(2) {
              [1]=>
              string(35) “b1_677298044585ae514ca76859b3bb343c”
              [2]=>
              string(35) “b2_677298044585ae514ca76859b3bb343c”
              }
              ["language":protected]=>
              array(17) {
              ["provide_address"]=>
              string(54) “You must provide at least one recipient email address.”
              ["mailer_not_supported"]=>
              string(25) ” 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: ”
              ["recipients_failed"]=>
              string(45) “SMTP Error: The following recipients failed: ”
              ["data_not_accepted"]=>
              string(30) “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: ”
              ["smtp_error"]=>
              string(19) “SMTP server error: ”
              ["empty_message"]=>
              string(18) “Message body empty”
              ["invalid_address"]=>
              string(15) “Invalid address”
              ["variable_set"]=>
              string(30) “Cannot set or reset variable: ”
              }
              ["error_count":"PHPMailer":private]=>
              int(1)
              ["sign_cert_file":"PHPMailer":private]=>
              string(0) “”
              ["sign_key_file":"PHPMailer":private]=>
              string(0) “”
              ["sign_key_pass":"PHPMailer":private]=>
              string(0) “”
              ["exceptions":"PHPMailer":private]=>
              bool(false)
              }

              The SMTP debugging output is shown below:

              SMTP -> FROM SERVER:220 mail.groupe-initiatives.com ESMTP Service (Lotus Domino Release 5.0.8) ready at Tue, 20 Nov 2012 17:03:03 +0100

              SMTP -> FROM SERVER: 250-mail.groupe-initiatives.com Hello http://www.groupe-initiatives.com ([92.103.27.106]), pleased to meet you
              250-HELP
              250 SIZE

              SMTP -> FROM SERVER:250 webmaster.if@groupe-initiatives.com… Sender OK

              SMTP -> FROM SERVER:554 Relay rejected for policy reasons.

              SMTP -> ERROR: RCPT not accepted from server: 554 Relay rejected for policy reasons.

              SMTP Error: The following recipients failed: ange.ripouteau@orange.fr

              I have this message now. Any idea ??

              • The message is self explanatory. The server is rejecting the message because you can’t use that server to send email. Maybe you’re not using SMTP authentication, or maybe you’re using the wrong mail server.

  13. After a lot of trial and error, and referrals to WordPress, and referrals to the plugin creator…I found that Yahoo hosting “discontinued their ability to use SMTP”, therefore you can’t use any of the SMTP options if you host with Yahoo. I’ve tried using the PHP options and the test emails go through, but none of the form emails. Still trying to find a solution.

    • Interesting. Have you tried using an external mail provider and connecting over SSL? For example, I connect to my own mailserver on port 443 for both incoming and outgoing mail, thus typically bypassing all firewalling, because it appears to be encrypted HTTP traffic.

      • No, I haven’t tried this and I don’t really understand it. So I should still set the SSL encryption? The funny thing is that forms are all going to Yahoo emails set up through their Yahoo hosting.

        • You need an SMTP service, most support SSL these days. Assistance setting that up is beyond the scope of plugin support. However, I’m considering trialling a new approach to support whereby folks can pay $99 per incident for detailed support. Would you like to trial that service?

            • Like I said, if you’d like to pay $99 I’ll gladly assist you with your WordPress mail issues. But choosing a host and mail provider is well outwith the scope of support I provide for this plugin.

  14. Hi all,
    I using contact form 7 plugin, but it only run on localhost, when I upload to server it not run. Please help me. It’s problem? Thank you very much.

    • There is no actionable information in your message. No error messages, no description of a problem, simply saying “it not run” does not allow me to help you.

  15. PlugIn works really well and it solved my email going into spam. :)
    I have only one problem.
    Sending the email trough my GMail account seems to overwrite the sender email information.
    Sender name is correct, text, subjet ok, but the sender email is overwritten. (it’s a contact form so is always different)
    Any suggestion?
    Thanks

    • BTW I installed your plug in for logging the mail activity and found out that seems that the sender parameter is not setted.

      At the beginning I read correctly:
      ‘headers’ => ‘From: “stfn” ‘,

      But on “step 6″ I have:

      ‘From’ => ‘s@csc.com’,
      ‘FromName’ => ‘stfn’,
      ‘Sender’ => ”,

      Do you think is the sender set to blank to be the problem?
      In this case how can I fix this setting even the “sender” as the “from” parameter?

        • Thanks Callum.
          These days I’ve been talking to other guys and they all said the same, seems that is one of the things made on purpose to prevent from spam.
          Thanks again.

        • Ok I can confirm you now.
          Used another SMTP that not overwrites and it worked perfectly :)
          CHeers!

  16. I am using Formidable forms on one of my sites, and have been having issues with spam filters and users receiving notifications. I was looking around on Formidable boards and they suggested using an SMPT plugin. However, the problem I am having is when the plugin is enabled the notification spits out the HTML code in the email instead of building the email with HTML and sending that notification. Just wondering if you have ever herd of a similar problem and knew of any fix.

    • I don’t recall any reports of similar issues. Not sure what would be causing that. Probably an issue with an SMTP server or server config somewhere. Have you tried other SMTP plugins? Some of them use their own SMTP mailer while this one only enables functionality which is included with WordPress.

  17. This plug-in would be exactly what I need…if I could get it to work. When I install it and go to the settings page it lists the two options “send via SMTP” and “use PHP” however there are no boxes to check off either option. In other words, I cannot select either option. I’ve tried redownloading, re-installing, deleting all the files etc. with no avail. An ideas? Maybe a compatibility issue with another plug in?

    • Apologies for the slow response. This sounds very interesting. Can you check your PHP error logs? Is there any info in there? Which other plugins do you have installed? What operating system / Apache / PHP version is your server running?

  18. Hi, i used the plugin and can successfully send the test mail with gmail smtp settings. But it doesnt seem to work on those actual registration confirmation emails. What could be the cause of this, or how can it be fixed? Thanks

  19. Hi Callum
    Thnaks the great plugin.
    Please, help-me… sorry my bad english.

    I use Wp-mail-smtp in Google Apps.
    smtp.gmail.com
    587
    Use TLS encryption
    Yes: Use SMTP authentication.
    Checked Set the return-path to match the From Email

    but return path email not return my customer mail.. only me (my@mail.com). Please, help!!!

    In Contact Form configurations (additional settings), i inform
    Reply-To: [your-name]

    thank e regards from Brazil
    Maysa
    Return-Path: [your-name]

  20. Hi;
    I’m having similar problems with Gmail and the plugin. I followed your instructions but getting the following:

    The SMTP debugging output is shown below:

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

    The following From address failed: **********@gmail.com

    Thanks in advance!

  21. Hello!

    How can I use NTLM and/or GSSAPI authentication in wp_mail() under Windows/WAMP installation? Anyway thanks for your very useful plugin.

  22. Hi Callum,

    Really thankful for your plugin, I think I have it working well, but I’m running into a small problem.

    All test emails work perfectly, then when I test the Gravity Form on the site with my personal email as the recipient, again it works perfectly. I then change it my clients email and they do not receive anything.

    I can see on my host providers webmail an email that says No Such User Here. I dont understand why my email is fine yet theirs isnt.

    If you have any ideas, I would appreciate any tips you have. Thanks again.

  23. SMTP HOST: mail.yogaastoria.com
    Port: 26
    plugin is not working. i called up my webhost and they say to contact the plugin developer. please advise what is going wrong. thank you. lalita
    SMTP -> ERROR: Failed to connect to server: Connection refused (111)

    • Maybe you have the wrong mail server settings? Or your host blocks outgoing connections from PHP? The plugin is unlikely to be the issue, it only activates features already shipped with WordPress.

  24. Subject: Change request WP Mail SMTP plugin

    Hi Callum,

    Thank you for giving us a great plugin such as WP Mail SMTP. I’ve been using the WP Mail SMTP plugin quite some time now and there is one thing I would like to ask you to change. The password for the username is visible. Is it possible to make it hidden (like with dots or something)?

    With Kind regards,

    Sjors Visser

  25. Hi,
    thanks for your plugin, it works like a charm.
    I used it to make Easy Contact Forms work through the google smtp server.
    However, the html emails that this plugin sends, arrive with a content-type=text/plain header, hence do not show up nicely.
    Have you heard about this issue before and do you have any suggestions?
    Thanks in advance,
    Joop

  26. Pingback: WP Mail SMTP yardım | üyesohbet,uyesohbet,uye,sesliuye,uyechat,uye18,uye34,uye,sex,uyekizlar,uyebeyleri,uyeradyo,uyechat

  27. I can you help.

    Emails seem to be not sending to hotmail or any other Microsoft related emails. This makes me wonder if the server in on the blocked list? can you have a look? or is there another issues

    thanks

    earl

    • I’m not sure, the issue is between your mail server and other mail providers, absolutely nothing to do with me or the plugin.

  28. Great plugin and works like a charm with Gravity Forms. Is it a plugin fix with yours or GF to send not only the the form data with field labels to the 3rd party email but to also include the form data as an attachment?

    • WP Mail SMTP doesn’t change the actual content of the message in any way. The issue you’re describing is most likely related to Gravity Forms.

  29. The ‘activate’ link is just redirecting to my main blog page. If I go back into plugin options, the plugin is not active. Any pointers on how I can start debugging this, does the activate process write to a log file somewhere?

    (I can deactivate/activate other plugins…)

    Thanks.

    • Very interesting. That might happen if there is some kind of PHP error. Can you check your PHP error log and see if wp-mail-smtp is mentioned in there anywhere? The plugin file is called wp_mail_smtp.php by the way, underscores as opposed to dashes. Only other suggestion is to try uploading the plugin again (maybe by hand if you installed it with the installer). What operating system / web server / PHP version are you running?

  30. Great Plugin – Works great…

    I have an issue where once every few weeks. I will get a timeout connecting to mail server (from the test). I reboot the web server (windows) and then everything works great again… any thoughts as what could be causing the issue or what to monitor

    • Interesting. It times out consistently until you reboot? Sounds like a server issue to me, but that’s just a guess, and I know absolutely nothing about Windows servers, so not sure what to suggest. If you were on *nix I’d suggest trying to connect to the mailserver with telnet while it’s in the timeout state, and see if that works. If telnet also fails to connect, it’s probably server wide. If it doesn’t, maybe PHP specific. I’d guess that’s how I’d proceed, test various things trying to narrow down which part of the stack is the issue.

      • Just an FYI follow up to this.
        As you suggested I tried to telnet to the mail server when it was in this “hung” mode and the telnet connection failed.
        (I tested from another machine at the same time and it worked)

        So it suggests to me that it is server issue…perhaps a firewall issue.

        I will continue to test and post when I find answer.

  31. Hello,
    Thank you very much for sharing this useful plugin!
    I have a problem with the reset password functionality. No email is sent. This message appears:
    “The e-mail could not be sent.
    Possible reason: your host may have disabled the mail() function…”

    The registration email is sent correctly so the email settings are fine.

    Thanks
    B

  32. Hi, Callum!
    I’ve installed the plugin and made all settings (smtp options taken from my hoster), but attempt to sent a test from the page ends with white screen. No error messages, just the screen of death. This screen appears both at smpt and php mailer options chosen…
    What could be a problem at?

    • Woohoo, a real question with a real problem! Don’t know what the cause it, but the answer lies in your PHP error logs. That’s the only place to diagnose the dreaded WSOD unfortunately! Let me know what you find in there and I’ll do my best to help…

      • Currently I see only this in the logs (appears when I try to send test):
        ALERT – script tried to increase memory_limit to 268435456 bytes which is above the allowed value (attacker ’78.27.153.48′, file ‘/sata2/home/users/b2bbtl/www/www.b2b-btl.com.ua/wp-admin/admin.php’, line 109)

          • Sounds like progress. The memory limit error is a strange one, not sure if it’s connected or not. Have you got email working now?

            • Yes, Callum, everything works fine. Thank you. The problem with connection suddenly dissapeared after switching between WP-mail and mail and back. I can’t expalin it, but am happy it works )))

  33. Hi Callum,

    Firstly, thanks for writing a decent tool to manage the smtp settings.

    I installed it but for some reason I can get a test email send to work, but not the site contact form. I’ve also installed your log plugin, but that doesn’t reveal any issues or errors. I also had to change its priority to last because with a 1 priority, it runs BEFORE you have configured the SMTP settings for phpmailer.

    Not sure how to get wordpress to actually log the smtp mail send errors. A little frustrating!

    Any help would be appreciated!

    Greg

    • It’s meant to run early so as to catch all calls to wp_mail() I think. It’s only supposed to log calls to the function, not results, as far as I remember, it’s been a while! I’m not sure if you can log the SMTP mail send errors. Does your mail server reject emails if they have the wrong sender address? Could be that the contact form is changing the “From” to be the submitted instead of WordPress. Try changing the “From email” on the options page and then sending another test message to the same email address as the contact form. Also, check if the contact form plugin uses wp_mail() at all, or if it calls mail() directly or has its own delivery method.

      • Thanks Callum. The solution in the end was to reinstall the modules and recreate the contact form. After that it worked like a charm. Regarding the logging: yes, I found out it is not possible to record the result, but setting the logging to much later, correctly show me what was happening, so I would suggest doing that to your module. Thank you for your response!

        • I’m not clear on the purpose of logging wp_mail() calls with a lower priority. The function arguments should be logged as they were sent, to get the best picture of what’s going on. Or maybe I’m misunderstanding what you mean. Can you give me a bit more detail?

  34. I installed the pluggin wp mail smtp and tested it. The test mail was sent to destination e-mail. However when I try to send an e-mail throught the locally hosted site it says:Failed to send your message. Please try later or contact the administrator by another method.
    How can the test message works on the pluggin test but sending mail through the website hested locally does not!!

  35. Hi,
    I am having a lot of trouble her and I hop you can help.

    I have several websites set up:
    The emails are being hosted on live.com and the websites are hosted on Dreamhost (I did not set this system up)

    I am using Gravity forms and not getting notifications.

    The issue is I don’t know what settings to put in the advanced email ioptions.

    When I put smtp.live.com I get
    SMTP -> ERROR: Failed to connect to server: (0)

    The following From address failed: thana@digitalkonnection.com

    If I put in smtp.digitalkonnection.com
    I get SMTP -> ERROR: Failed to connect to server: php_network_getaddresses: getaddrinfo failed: Name or service not known (0)

    The following From address failed: thana@digitalkonnection.com

    If I use mail.live.com
    I get SMTP -> ERROR: Failed to connect to server: Connection timed out (110)
    and sometimes SMTP -> ERROR: Failed to connect to server: Connection refused (111)

    The following From address failed: thana@digitalkonnection.com

    It says the test message was sent (TRUE) but I never receive anything

    I’ve tried all sorts of combinations with the check boxes and nothing seems to work! http://awesomescreenshot.com/0e7170tb9e

    Can somebody please help me?

    • Unfortunately a bug in WordPress means that it always reports success. Thanks for the screenshot, very helpful. You almost certainly need to change the port number from 25 to something else, depending on which server you’re using. I’d guess that’s your issue as many hosts block port 25 to stop indiscriminate spamming. If the correct port number doesn’t work, let me know and I’ll have another look.

  36. Thank you for a wonderful plugin~ I am using in on a multisite install right now.
    It has saved me in so many ways! I love having the options panel in the subdomains so that it can be configured independently. And it helps so much when a user calls me and says…oops…I changed my password and I show them where they need to change it in their website too.

    I am more that satisfied with the functioning of it but would like to take it to the next “white label” level for my customers.

    Right now when I change the from email it will only replace the second part of the from email (in the ) as follows:
    http://www.realestatebroker.com

    It is ok now, but I would like to replace the http://www.realestatebroker.com part too! Just to give the subdomain user a more white label feel.
    like the following:
    http://www.lajolla.realestatebroker.com

    Is that possible even on a multi site? Or is that the default because they are using our email servers. (www.realestatebroker.com)

    I have read through your comments which were very helpful but still haven’t found a similar question to what I am hoping we can do!
    I am comfortable working in the config file, I just need to know what to look for to address this in the individual multisites.

    Blessings,
    Leigh

    • I’m not sure what you’re asking. You repeated the same web address twice. I’m not sure what you want to change or what you’re currently seeing. The From address will only override emails sent by WordPress with the default wordpress@domain.tld email address.

      • Thank you for your very fast email response!
        I am sorry that I was not clear enough, the from field in the plugin works GREAT….
        I just want to take it one step farther…

        In a return email I see,
        www_maindomain_com

        What I want to see is
        www_SUBdomain_com

        I want to change the first part of the from line to no longer be our main domain but customize it for the user.

        I may be asking for something that is not possible, since we are using multisite. But it doesn’t hurt to ask!

        Thank you so much for your time, I reallly appreciate wordpress developers like yourself! This makes working in wordpress a pleasure!
        Thank you
        Leigh

        • oh bother…the autoformating on the comments has edited out the parts to make my question clear…
          I am very sorry, I will try to send a screen shot of my question to the autoresponder.

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>