4

I tried using both Configure SMTP and WP Mail SMTP to send all domain emails through my donotreply Google Apps email address, but neither plugin worked. Attempting to send test emails through either results in the error SMTP -> ERROR: Failed to connect to server: Network is unreachable (101). I entered the information correctly (smtp.gmail.com, port 465 OR 587 [tried both], SSL [also tried TLS]), but it cannot connect.

Is there something I may need to configure with my host or on the Apps dashboard to make it work properly? I had it working with this Google Apps account on a different domain with my same host, but that WordPress installation has been deleted.

  • 1
    As you have tried two separate plugins. Sounds like your host could be blocking the outbound connection and/or has it's own SMTP service in the way and is blocking. Check with your host to see if they allow out bound SMTP, some shared hosts don't to stop spammers using their services. If all you want to do is change the email your email comes from there are other alternatives. This question covers that solution adequately wordpress.stackexchange.com/questions/12368/… – Barry Carlyon Oct 28 '12 at 9:08
  • Who is your web host? Please don't say it's GoDaddy.... – Mat Mar 29 '18 at 9:54
0

It sounds like something to do with your website hosting company. Again, how does your function look like?

I usually use something like this:

function mailer_config(PHPMailer $mailer){
    $mailer->IsSMTP();
    $mailer->Host = "smtp.yourdomainhere.com";
    $mailer->Port = 25;   // look, this depends on your mail settings
    $mailer->SMTPDebug = 0; 
    $mailer->CharSet  = "utf-8";
    $mailer->From = "no-reply@yourdomainhere.com";
    $mailer->FromName = "Your Name Here";
}
add_action( 'phpmailer_init', 'mailer_config', 10, 1);

You can read up more on that approach here: https://core.trac.wordpress.org/browser/tags/3.5/wp-includes/class-phpmailer.php

Simply drop the complete function in your functions.php file.

0

Please check Easy SMTP Easy WP SMTP I'm using this plugin on my pages and working very fine :)

0

You are trying with your Gmail mail server and it's blocked from Gmail not form your host.

Enable Gmail less secure apps into your Gmail account.

If you want to allow access anyway, follow these steps:

1) Go to the Less secure apps section of your Google Account.

2) Turn on Allow less secure apps. If you don't see this setting, your administrator might have turned off less secure app account access.

and use this setting: Outgoing Mail (SMTP) Server: smtp.gmail.com.

Use Authentication: Yes.

Use Secure Connection: Yes (TLS or SSL depending on your mail client/website SMTP plugin)

Username: your Gmail account (e.g. user@gmail.com)

Password: your Gmail password.

Port: 465 (SSL required) or 587 (TLS required)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.