简体   繁体   中英

Swift_TransportException Failed to authenticate on SMTP server with username email@domain.com using 2 possible authenticators on shared host

I'm develop a website using Laravel 4.1. I config my email system and send email successfully on built-in server localhost:8000. But when I host the web on a shared hosting, it always tell: Swift_TransportException Failed to authenticate on SMTP server with username "email@domain.com" using 2 possible authenticators I don't know what the reason is? I've search on this site but no solution works.

return array(

    'driver' => 'smtp',

    'host' => 'smtp.gmail.com',

    'port' => 587,

    'from' => array('address' => 'email@gmail.com', 'name' => 'Test email'),

    'encryption' => 'ssl',

    'username' => 'your_gmail_username',

    'password' => 'your_gmail_password',

    'sendmail' => '/usr/sbin/sendmail -bs',

    'pretend' => false,

);

I also used my our domain's email but it doesn't work neither. Hope for help.

In my case, I had a Cpanel dedicated server. My host informed me that exim mail server was failing and restarting a couple times a day.

It looked like all connection threads were being used up and then locked until it restarts.

My host added another 100 connection threads to the pool. Most probably this help you as well.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM