最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

plugins - Sending all emails using SMTP

programmeradmin0浏览0评论

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, 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.

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, 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.

Share Improve this question asked Oct 28, 2012 at 2:58 vaindilvaindil 1751 silver badge4 bronze badges 2
  • 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/questions/12368/… – Barry Carlyon Commented Oct 28, 2012 at 9:08
  • Who is your web host? Please don't say it's GoDaddy.... – Mat Commented Mar 29, 2018 at 9:54
Add a comment  | 

4 Answers 4

Reset to default 1

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.

Use Authentication: Yes.

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

Username: your Gmail account (e.g. [email protected])

Password: your Gmail password.

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

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";
    $mailer->Port = 25;   // look, this depends on your mail settings
    $mailer->SMTPDebug = 0; 
    $mailer->CharSet  = "utf-8";
    $mailer->From = "[email protected]";
    $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/browser/tags/3.5/wp-includes/class-phpmailer.php

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

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

I'm using YaySMTP, it's simple and easy to use

发布评论

评论列表(0)

  1. 暂无评论