Question

WordPress SMTP DigitalOcean Issue

  • Posted on December 22, 2014
  • KHANAsked by KHAN

Hi,

Has anyone had an issue with using WP Mail SMTP on digitalocean servers?

I created a contact form plugin for my wordpress website.

I am using the wp_mail to send email. http://codex.wordpress.org/Function_Reference/wp_mail

I am using WP MAIL SMTP plugin. So that wp_mail function uses SMTP instead of the standard mail(). https://wordpress.org/plugins/wp-mail-smtp/

local: (smtp.live.com) Sent live: (smtp.live.com ) Failed

Was told smtp.live.com blocks digitaloceans IP thats fine.

local: (smtp.gmail.com) Sent live: (smtp.gmail.com) Failed

Error message from WP MAIL SMTP plugin: [“authenticate”]=> string(35) “SMTP Error: Could not authenticate.” [“connect_host”]=> string(43) “SMTP Error: Could not connect to SMTP host.” [“data_not_accepted”]=> string(30) “SMTP Error: data not accepted.”

local: (smtp.mandrillapp.com) Sent Live: (smtp.mandrillapp.com) Failed

Same Error as gmail.

==========================================================================

I’ve gone onto gmail and EVEN mandrill and it’s not working live but works locally. So i am unsure what is the difference on my local ubuntu 14.04 machine when compared to my live droplet ubuntu 14.04 machine when i set them up the same way using the guides found on digital ocean.

  1. Anyone else had a problem with this?

  2. Does someone know of an alternative to WP SMTP Plugin so i can rule out or determine whether the plugin has an issue when used from my droplet.

  3. Could port 587 or 465 be blocked on my droplet? Could someone please tell me how i can check and then how i can open the ports.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

It’s possible that SMTP is blocked on your droplet. Run the following command to check if you can connect to port 25 on a remote server:

nc -vz smtp.gmail.com 25

If that does not succeed, please open a support ticket so the team can take a look and help you out. Thanks!

Hello I have this problem, What can I do? Test Message Sent The result was: C:\wamp64\www\rabbit\wp-content\plugins\wp-mail-smtp\wp_mail_smtp.php:257:boolean false The full debugging output is shown below: PHPMailer Object ( [Version] => 5.2.22 [Priority] => [CharSet] => UTF-8 [ContentType] => text/plain [Encoding] => 7bit [ErrorInfo] => SMTP Error: Could not connect to SMTP host. [From] => my.grannies.food@gmail.com [FromName] => Grannies Food [Sender] => [ReturnPath] => [Subject] => WP Mail SMTP: Test mail to deleon.josejuan3@gmail.com [Body] => This is a test email generated by the WP Mail SMTP WordPress plugin. [AltBody] => [Ical] => [MIMEBody:protected] => This is a test email generated by the WP Mail SMTP WordPress plugin.

[MIMEHeader:protected] => Date: Sun, 5 Nov 2017 14:21:41 +0000

To: deleon.josejuan3@gmail.com From: Grannies Food Subject: WP Mail SMTP: Test mail to deleon.josejuan3@gmail.com Message-ID: 29edd326265f7ca1667075bd7a13c902@localhost X-Mailer: PHPMailer 5.2.22 (https://github.com/PHPMailer/PHPMailer) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8

[mailHeader:protected] => 
[WordWrap] => 0
[Mailer] => smtp
[Sendmail] => /usr/sbin/sendmail
[UseSendmailOptions] => 1
[PluginDir] => 
[ConfirmReadingTo] => 
[Hostname] => 
[MessageID] => 
[MessageDate] => Sun, 5 Nov 2017 14:21:41 +0000
[Host] => smtp.gmail.com
[Port] => 465
[Helo] => 
[SMTPSecure] => tls
[SMTPAutoTLS] => 1
[SMTPAuth] => 1
[SMTPOptions] => Array
    (
    )

[Username] => my.grannies.food@gmail.com
[Password] => cdg1cdg1607993281
[AuthType] => 
[Realm] => 
[Workstation] => 
[Timeout] => 300
[SMTPDebug] => 0
[Debugoutput] => echo
[SMTPKeepAlive] => 
[SingleTo] => 
[SingleToArray] => Array
    (
    )

[do_verp] => 
[AllowEmpty] => 
[LE] => 

[DKIM_selector] => 
[DKIM_identity] => 
[DKIM_passphrase] => 
[DKIM_domain] => 
[DKIM_private] => 
[DKIM_private_string] => 
[action_function] => 
[XMailer] => 
[smtp:protected] => SMTP Object
    (
        [Version] => 5.2.22
        [SMTP_PORT] => 25
        [CRLF] => 

        [do_debug] => 0
        [Debugoutput] => echo
        [do_verp] => 
        [Timeout] => 300
        [Timelimit] => 300
        [smtp_transaction_id_patterns:protected] => Array
            (
                [exim] => /[0-9]{3} OK id=(.*)/
                [sendmail] => /[0-9]{3} 2.0.0 (.*) Message/
                [postfix] => /[0-9]{3} 2.0.0 Ok: queued as (.*)/
            )

        [smtp_conn:protected] => 
        [error:protected] => Array
            (
                [error] => 
                [detail] => 
                [smtp_code] => 
                [smtp_code_ex] => 
            )

        [helo_rply:protected] => 
        [server_caps:protected] => 
        [last_reply:protected] => 
    )

[to:protected] => Array
    (
        [0] => Array
            (
                [0] => deleon.josejuan3@gmail.com
                [1] => 
            )

    )

[cc:protected] => Array
    (
    )

[bcc:protected] => Array
    (
    )

[ReplyTo:protected] => Array
    (
    )

[all_recipients:protected] => Array
    (
        [deleon.josejuan3@gmail.com] => 1
    )

[RecipientsQueue:protected] => Array
    (
    )

[ReplyToQueue:protected] => Array
    (
    )

[attachment:protected] => Array
    (
    )

[CustomHeader:protected] => Array
    (
    )

[lastMessageID:protected] => <29edd326265f7ca1667075bd7a13c902@localhost>
[message_type:protected] => plain
[boundary:protected] => Array
    (
        [1] => b1_29edd326265f7ca1667075bd7a13c902
        [2] => b2_29edd326265f7ca1667075bd7a13c902
        [3] => b3_29edd326265f7ca1667075bd7a13c902
    )

[language:protected] => Array
    (
        [authenticate] => SMTP Error: Could not authenticate.
        [connect_host] => SMTP Error: Could not connect to SMTP host.
        [data_not_accepted] => SMTP Error: data not accepted.
        [empty_message] => Message body empty
        [encoding] => Unknown encoding: 
        [execute] => Could not execute: 
        [file_access] => Could not access file: 
        [file_open] => File Error: Could not open file: 
        [from_failed] => The following From address failed: 
        [instantiate] => Could not instantiate mail function.
        [invalid_address] => Invalid address: 
        [mailer_not_supported] =>  mailer is not supported.
        [provide_address] => You must provide at least one recipient email address.
        [recipients_failed] => SMTP Error: The following recipients failed: 
        [signing] => Signing Error: 
        [smtp_connect_failed] => SMTP connect() failed.
        [smtp_error] => SMTP server error: 
        [variable_set] => Cannot set or reset variable: 
        [extension_missing] => Extension missing: 
    )

[error_count:protected] => 2
[sign_cert_file:protected] => 
[sign_key_file:protected] => 
[sign_extracerts_file:protected] => 
[sign_key_pass:protected] => 
[exceptions:protected] => 1
[uniqueid:protected] => 29edd326265f7ca1667075bd7a13c902

) The SMTP debugging output is shown below:

Thank You