Gmail/SMTP Not Working Using Recommended Settings

Has anyone been able to configure e-Newsletter to work with Gmail? I'm receiving the following error message whenever I try to send a test email:

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

My SMTP username and SMTP password are correct. When sending from php mail, it's delivered without a problem.

  • NYCWW

    I've attached a screenshot, but it's probably a moot point. Apparently, "it's a Go Daddy thing". I contacted them late last night and they stated "there is no way to set your account to use an outside SMTP relay."

    I found at least five similar inquiries on their forums and they all received the same answer regarding using Gmail's SMTP. It's a shame, because their so-called "WordPress Hosting" (aka grid hosting aka 4GH) is very promising (noticeably better performance than comparably priced shared hosting plans). It's also ironic, considering that Google Apps uses a Go Daddy API to update the MX records and Go Daddy's hosting control panel interfaces with Google Analytics. You'd think they understood the strategic advantage of catering to Gmail users. In this day and age, anything that makes life more difficult for users of WordPress and Google Apps seems like bad business for a tech company.

    Assuming I'm stuck with sending out email from my web host, is there any advantage/disadvantage to using SMTP vs. PHP Mail?

  • DavidM

    Hi nycwebworks,

    There's some discussion surrounding PHP Mail at the following from stackoverflow:
    http://stackoverflow.com/questions/4565066/why-shouldnt-i-use-phps-mail-function

    And ultimately, I'd see the issue to consider there is whether spam protection will automatically weed out any email from a PHP Mail source. Perhaps you could test out various services like Yahoo mail and Gmail wih the PHP Mail option?

    Cheers,
    David

  • marcdubeau

    Hi nycwebworks
    I posted this elsewhere, but it seems you also may benefit from this answer. This will help your resolve the issue you stated above. You must install the following plugin to change the way WP deals with email. The plugin is called WP Mail SMTP. Once you set up the plugin, the way your hosting is set up must be taken into account. If you have a direct hosting account, the plugin should work without issue. If you happen to have a shared hosting account like I do, you must make a few changes to your cpanel. First, you must create an email account in Cpanel using your google account info. This seems unnecessary for it to work, but it is essential to allow the smtp plugin to work properly. FOllowing this step, you must go to your MX records in Cpanel and change the configuration from a "Automatically Detect Configuration" to "Remote Mail Exchanger". Log back into Wordpress and send a test email. Should work.

    Once you have set this up, go to the newsletter plugin and include all the settings for your Google account and it will send the newsletter to all you website members. Hope this helps.

  • Travis

    To echo what @marcdubeau has said,
    WP Mail SMTP can solve a lot of mailing issues. Though I've found there are a few instances where it still uses the old mail() function. Such as when you add an existing user to another site in the network.

    In network installs it also helps to set your SMTP settings in your wp-config file:

    /* Auto-Config WP SMTP */
    define('WPMS_ON', true);
    define('WPMS_MAIL_FROM', 'web@email.com');
    define('WPMS_MAIL_FROM_NAME', 'Website');
    define('WPMS_MAILER', 'smtp'); // Possible values 'smtp', 'mail', or 'sendmail'
    define('WPMS_SMTP_HOST', 'mail.website.com'); // The SMTP mail host
    define('WPMS_SMTP_PORT', 25); // The SMTP server port number
    define('WPMS_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', 'user@website.com'); // SMTP authentication username, only used if WPMS_SMTP_AUTH is true
    define('WPMS_SMTP_PASS', 'secret'); // SMTP authentication password, only used if WPMS_SMTP_AUTH is true