Smtp error could not authenticate яндекс

I'm using PHPMailer in a Simple Script For Send Email's Through Gmail, and I'm getting an "Unknown Error" (At least for me!): SMTP Error: Could not authenticate. Error: SMTP Error: Could not

I’m using PHPMailer in a Simple Script For Send Email’s Through Gmail, and I’m getting an «Unknown Error» (At least for me!):

SMTP Error: Could not authenticate.
Error: SMTP Error: Could not
authenticate.

SMTP server error: 5.7.1 Username and
Password not accepted. Learn more at
535 5.7.1
http://mail.google.com/support/bin/answer.py?answer=14257
p38sm2467302ybk.16

I’ve read about Configure OpenSSL For SSL/TLS Connections, and I did it. Apache And PHP Are properly-Configured (With OpenSSL extension Running in PHP and mod_ssl running in Apache 2.2.16).

This is The PHP Script:

 <?php
  require_once ("PHPMailerclass.phpmailer.php");
  $Correo = new PHPMailer();
  $Correo->IsSMTP();
  $Correo->SMTPAuth = true;
  $Correo->SMTPSecure = "tls";
  $Correo->Host = "smtp.gmail.com";
  $Correo->Port = 587;
  $Correo->UserName = "foo@gmail.com";
  $Correo->Password = "gmailpassword";
  $Correo->SetFrom('foo@gmail.com','De Yo');
  $Correo->FromName = "From";
  $Correo->AddAddress("bar@hotmail.com");
  $Correo->Subject = "Prueba con PHPMailer";
  $Correo->Body = "<H3>Bienvenido! Esto Funciona!</H3>";
  $Correo->IsHTML (true);
  if (!$Correo->Send())
  {
    echo "Error: $Correo->ErrorInfo";
  }
  else
  {
    echo "Message Sent!";
  }
?>

The Username and Password are OK, And I tried in Thunderbird, without any problem.
I’ve also Used SSL Authentication and Port 465, getting the same Error.

Cœur's user avatar

Cœur

36.4k25 gold badges191 silver badges259 bronze badges

asked Oct 16, 2010 at 16:57

Alejandro Echeverri's user avatar

2

I encountered this problem. To get it working, I had to go to myaccount.google.com -> «Sign-in & security» -> «Apps with account access», and turn «Allow less secure apps» to «ON» (near the bottom of the page).

Alternatively you can follow this direct link to these settings

enter image description here

Joundill's user avatar

Joundill

6,42211 gold badges35 silver badges50 bronze badges

answered Sep 4, 2015 at 14:56

cwd's user avatar

7

Try this instead :

$Correo->Username = «foo@gmail.com»;

I tested it and its working perfectly without no other change

answered Oct 16, 2010 at 17:19

malletjo's user avatar

malletjomalletjo

1,78616 silver badges18 bronze badges

2

I received the same error and in mycase it was the password. My password has special characters.

If you supply the password without escaping the special characters the error will persist.

E.g $mail->Password = " por$ch3"; is valid but will not work using the code above .

The solution should be as follows: $mail->Password = "por$ch3";

Note the Backslash I placed before the dollar character within my password.
That should work if you have a password using special characters

answered Aug 1, 2012 at 9:57

Bubba's user avatar

BubbaBubba

1011 silver badge7 bronze badges

2

Because Allow less secure apps is no longer available

enter image description here

The solution was to enable 2-step verification and generate app password

app

select mail and computer from the list then click generate

copy the code shown in the box and replace your google password with your app password it works like a charm.

app password

answered Jun 28, 2022 at 2:10

Kym NT's user avatar

Kym NTKym NT

6309 silver badges28 bronze badges

1

I experienced the same error when configuring the WP-Mail-SMTP plugin in WordPress.

The problem would persist even when I have ‘triple checked’ the settings and login credentials, and am able to log in manually using a browser.

There’s a list of steps you can take to fix this.

  1. Create a new password for the Gmail account you want to use
  2. Enable less secure apps in Google Security settings
  3. Use the Display Unlock Captcha page to give your app or website permission to sign in to Gmail. Click Continue or follow the instructions.
  4. Sign in using the app or website. The smtp settings that work for me are 1) SMTP Host: smtp.gmail.com 2) SMTP port: 587 3) Encryption: TLS 4) Authentication: SMTP authentication 5) Username: example@gmail.com 6) Password: examplesecret

Greg's user avatar

Greg

20.9k17 gold badges81 silver badges106 bronze badges

answered Jul 20, 2017 at 8:24

pyfork's user avatar

pyforkpyfork

3,5972 gold badges20 silver badges18 bronze badges

1

my solution is:

  1. change gmail password
  2. on gmail «Manage your google Account» > Security > Turn on 3rd party app Access
  3. This the new step that i discover by UnlockingCaptcha that told in this site, the exact site is https://accounts.google.com/b/0/DisplayUnlockCaptcha, but maybe you want to read the former site first.

That all, hope it works for you

answered Jul 15, 2020 at 15:37

ibrahim saputra's user avatar

1

I received this error because of percentage signs in the password.

answered Dec 5, 2011 at 13:22

svandragt's user avatar

svandragtsvandragt

1,61320 silver badges37 bronze badges

1

For me I had a special characters in my password field, and I put it like $mail->Password = » por$ch3″ which work for gmail smpt server but not for other; so I just changed double quotes to single quotes and it works for me. $mail->Password = ‘ por$ch3’;

answered Jun 11, 2013 at 12:17

Rikin Adhyapak's user avatar

3

If you still face error in sending email, with the same error message. Try this:

$mail->SMTPSecure = 'tls';
$mail->Host = 'smtp.gmail.com';

just Before the line:

$send = $mail->Send();

or in other sense, before calling the Send() Function.

Tested and Working.

answered Jun 11, 2014 at 19:30

JackSparrow's user avatar

JackSparrowJackSparrow

9081 gold badge11 silver badges8 bronze badges

1

The other post is correct to resolve the issue but doesn’t address how to do it if the 2-step-verification is turned on. The option to allow the less secure apps is NOT available then. Here is an answer to how to do it:

a. Go to the URL of `https://myaccount.google.com/` and click `Sing-in and security`

b. Click on the app password. 

enter image description here

You will reach a page like this,

enter image description here

c. Create name of your app and generate a password for the respective app.  

d. Use that password acquired here inside the app.

This should resolve the issue.

answered May 20, 2018 at 10:16

Arefe's user avatar

ArefeArefe

10.4k16 gold badges101 silver badges159 bronze badges

0

I had the same issue and did all the tips including Gmail setting (e.g. less secure apps access) with no luck. But finally when I changed password to something different, for some reason it worked! FYI, the initial password did not have any special characters.

answered May 24, 2016 at 22:57

Ehsan's user avatar

EhsanEhsan

1,02211 silver badges20 bronze badges

  1. first go to https://myaccount.google.com
  2. Select Security tab
  3. Scroll down and select ‘Less secure app access’
  4. Turn on access

This will solve my “SMTP Error: Could not authenticate” in PHPMailer error.

answered Apr 29, 2020 at 13:07

ruwanmadhusanka's user avatar

ruwanmadhusankaruwanmadhusanka

7812 gold badges7 silver badges15 bronze badges

I had the same issue and did all the tips with no luck. Finally when I changed password to something different, for some reason it worked! (the initial password or the new one did not have any special characters)

answered Aug 18, 2019 at 14:06

user3809638's user avatar

0

The correct answer:
Go to «Manage your google accounts => Security => Signing in to Google => App passwords».
Generate your maill account password there (that will be used from other device)

answered Apr 13, 2022 at 9:49

Gosforth's user avatar

I had the same problem with authentication. The fix was to set up 2-step verification and create an application specific password for the device ( error messages for blocking the device will appear in your account settings->»Notifications and alerts» if you problem is the same with mine)

answered Jan 29, 2015 at 21:35

anu's user avatar

It was the selinux issue. I just updated the below given part in /etc/selinux/config file
SELINUX=permissive (it was SELINUX=enforcing before).
then just reboot the system by giving
reboot
Now the mail goes without any hassle.
Configuration

From Email Address : [noreply@yourdomain.com]
From Name : [your domain name]
SMTP Host   : smtp.gmail.com
Type of Encryption : SSL
SMTP Port : 465
SMTP Authentication  : YES
Username : [your mail id]
Password : [your password]

answered Feb 10, 2016 at 7:17

Jathin Prasad's user avatar

SMTP Error: could not authenticate
I had the same problem. The following troubleshooting steps helped me.

  • I turned off two-factor authentication in my gmail account.
  • I allowed less secure apps to access my gmail account. To get it working, I had to go to myaccount.google.com -> Sign-in & security -> Apps with account access, and turn Allow less secure apps to ON (near the bottom of the page).
  • At this step, when I tried to register a user, I would get the same error. Google would sent me a warning message that someone has my password and the login was blocked.
  • Gmail will then provide you with options. You either click whether the activity was yours or not yours. Click the option that the activity was yours.
  • Try registration again. It should now work.

cSteusloff's user avatar

cSteusloff

2,4376 gold badges27 silver badges50 bronze badges

answered Dec 14, 2017 at 11:47

Joshua Mutinda's user avatar

There is no issue with your code.

Follow below two simple steps to send emails from phpmailer.

  • You have to disable 2-step verification setting for google account if you have enabled.

  • Turn ON allow access to less secure app.

answered Apr 12, 2018 at 7:24

Ravindra Miyani's user avatar

I’m using PHPMailer in a Simple Script For Send Email’s Through Gmail, and I’m getting an «Unknown Error» (At least for me!):

SMTP Error: Could not authenticate.
Error: SMTP Error: Could not
authenticate.

SMTP server error: 5.7.1 Username and
Password not accepted. Learn more at
535 5.7.1
http://mail.google.com/support/bin/answer.py?answer=14257
p38sm2467302ybk.16

I’ve read about Configure OpenSSL For SSL/TLS Connections, and I did it. Apache And PHP Are properly-Configured (With OpenSSL extension Running in PHP and mod_ssl running in Apache 2.2.16).

This is The PHP Script:

 <?php
  require_once ("PHPMailerclass.phpmailer.php");
  $Correo = new PHPMailer();
  $Correo->IsSMTP();
  $Correo->SMTPAuth = true;
  $Correo->SMTPSecure = "tls";
  $Correo->Host = "smtp.gmail.com";
  $Correo->Port = 587;
  $Correo->UserName = "foo@gmail.com";
  $Correo->Password = "gmailpassword";
  $Correo->SetFrom('foo@gmail.com','De Yo');
  $Correo->FromName = "From";
  $Correo->AddAddress("bar@hotmail.com");
  $Correo->Subject = "Prueba con PHPMailer";
  $Correo->Body = "<H3>Bienvenido! Esto Funciona!</H3>";
  $Correo->IsHTML (true);
  if (!$Correo->Send())
  {
    echo "Error: $Correo->ErrorInfo";
  }
  else
  {
    echo "Message Sent!";
  }
?>

The Username and Password are OK, And I tried in Thunderbird, without any problem.
I’ve also Used SSL Authentication and Port 465, getting the same Error.

Cœur's user avatar

Cœur

36.4k25 gold badges191 silver badges259 bronze badges

asked Oct 16, 2010 at 16:57

Alejandro Echeverri's user avatar

2

I encountered this problem. To get it working, I had to go to myaccount.google.com -> «Sign-in & security» -> «Apps with account access», and turn «Allow less secure apps» to «ON» (near the bottom of the page).

Alternatively you can follow this direct link to these settings

enter image description here

Joundill's user avatar

Joundill

6,42211 gold badges35 silver badges50 bronze badges

answered Sep 4, 2015 at 14:56

cwd's user avatar

7

Try this instead :

$Correo->Username = «foo@gmail.com»;

I tested it and its working perfectly without no other change

answered Oct 16, 2010 at 17:19

malletjo's user avatar

malletjomalletjo

1,78616 silver badges18 bronze badges

2

I received the same error and in mycase it was the password. My password has special characters.

If you supply the password without escaping the special characters the error will persist.

E.g $mail->Password = " por$ch3"; is valid but will not work using the code above .

The solution should be as follows: $mail->Password = "por$ch3";

Note the Backslash I placed before the dollar character within my password.
That should work if you have a password using special characters

answered Aug 1, 2012 at 9:57

Bubba's user avatar

BubbaBubba

1011 silver badge7 bronze badges

2

Because Allow less secure apps is no longer available

enter image description here

The solution was to enable 2-step verification and generate app password

app

select mail and computer from the list then click generate

copy the code shown in the box and replace your google password with your app password it works like a charm.

app password

answered Jun 28, 2022 at 2:10

Kym NT's user avatar

Kym NTKym NT

6309 silver badges28 bronze badges

1

I experienced the same error when configuring the WP-Mail-SMTP plugin in WordPress.

The problem would persist even when I have ‘triple checked’ the settings and login credentials, and am able to log in manually using a browser.

There’s a list of steps you can take to fix this.

  1. Create a new password for the Gmail account you want to use
  2. Enable less secure apps in Google Security settings
  3. Use the Display Unlock Captcha page to give your app or website permission to sign in to Gmail. Click Continue or follow the instructions.
  4. Sign in using the app or website. The smtp settings that work for me are 1) SMTP Host: smtp.gmail.com 2) SMTP port: 587 3) Encryption: TLS 4) Authentication: SMTP authentication 5) Username: example@gmail.com 6) Password: examplesecret

Greg's user avatar

Greg

20.9k17 gold badges81 silver badges106 bronze badges

answered Jul 20, 2017 at 8:24

pyfork's user avatar

pyforkpyfork

3,5972 gold badges20 silver badges18 bronze badges

1

my solution is:

  1. change gmail password
  2. on gmail «Manage your google Account» > Security > Turn on 3rd party app Access
  3. This the new step that i discover by UnlockingCaptcha that told in this site, the exact site is https://accounts.google.com/b/0/DisplayUnlockCaptcha, but maybe you want to read the former site first.

That all, hope it works for you

answered Jul 15, 2020 at 15:37

ibrahim saputra's user avatar

1

I received this error because of percentage signs in the password.

answered Dec 5, 2011 at 13:22

svandragt's user avatar

svandragtsvandragt

1,61320 silver badges37 bronze badges

1

For me I had a special characters in my password field, and I put it like $mail->Password = » por$ch3″ which work for gmail smpt server but not for other; so I just changed double quotes to single quotes and it works for me. $mail->Password = ‘ por$ch3’;

answered Jun 11, 2013 at 12:17

Rikin Adhyapak's user avatar

3

If you still face error in sending email, with the same error message. Try this:

$mail->SMTPSecure = 'tls';
$mail->Host = 'smtp.gmail.com';

just Before the line:

$send = $mail->Send();

or in other sense, before calling the Send() Function.

Tested and Working.

answered Jun 11, 2014 at 19:30

JackSparrow's user avatar

JackSparrowJackSparrow

9081 gold badge11 silver badges8 bronze badges

1

The other post is correct to resolve the issue but doesn’t address how to do it if the 2-step-verification is turned on. The option to allow the less secure apps is NOT available then. Here is an answer to how to do it:

a. Go to the URL of `https://myaccount.google.com/` and click `Sing-in and security`

b. Click on the app password. 

enter image description here

You will reach a page like this,

enter image description here

c. Create name of your app and generate a password for the respective app.  

d. Use that password acquired here inside the app.

This should resolve the issue.

answered May 20, 2018 at 10:16

Arefe's user avatar

ArefeArefe

10.4k16 gold badges101 silver badges159 bronze badges

0

I had the same issue and did all the tips including Gmail setting (e.g. less secure apps access) with no luck. But finally when I changed password to something different, for some reason it worked! FYI, the initial password did not have any special characters.

answered May 24, 2016 at 22:57

Ehsan's user avatar

EhsanEhsan

1,02211 silver badges20 bronze badges

  1. first go to https://myaccount.google.com
  2. Select Security tab
  3. Scroll down and select ‘Less secure app access’
  4. Turn on access

This will solve my “SMTP Error: Could not authenticate” in PHPMailer error.

answered Apr 29, 2020 at 13:07

ruwanmadhusanka's user avatar

ruwanmadhusankaruwanmadhusanka

7812 gold badges7 silver badges15 bronze badges

I had the same issue and did all the tips with no luck. Finally when I changed password to something different, for some reason it worked! (the initial password or the new one did not have any special characters)

answered Aug 18, 2019 at 14:06

user3809638's user avatar

0

The correct answer:
Go to «Manage your google accounts => Security => Signing in to Google => App passwords».
Generate your maill account password there (that will be used from other device)

answered Apr 13, 2022 at 9:49

Gosforth's user avatar

I had the same problem with authentication. The fix was to set up 2-step verification and create an application specific password for the device ( error messages for blocking the device will appear in your account settings->»Notifications and alerts» if you problem is the same with mine)

answered Jan 29, 2015 at 21:35

anu's user avatar

It was the selinux issue. I just updated the below given part in /etc/selinux/config file
SELINUX=permissive (it was SELINUX=enforcing before).
then just reboot the system by giving
reboot
Now the mail goes without any hassle.
Configuration

From Email Address : [noreply@yourdomain.com]
From Name : [your domain name]
SMTP Host   : smtp.gmail.com
Type of Encryption : SSL
SMTP Port : 465
SMTP Authentication  : YES
Username : [your mail id]
Password : [your password]

answered Feb 10, 2016 at 7:17

Jathin Prasad's user avatar

SMTP Error: could not authenticate
I had the same problem. The following troubleshooting steps helped me.

  • I turned off two-factor authentication in my gmail account.
  • I allowed less secure apps to access my gmail account. To get it working, I had to go to myaccount.google.com -> Sign-in & security -> Apps with account access, and turn Allow less secure apps to ON (near the bottom of the page).
  • At this step, when I tried to register a user, I would get the same error. Google would sent me a warning message that someone has my password and the login was blocked.
  • Gmail will then provide you with options. You either click whether the activity was yours or not yours. Click the option that the activity was yours.
  • Try registration again. It should now work.

cSteusloff's user avatar

cSteusloff

2,4376 gold badges27 silver badges50 bronze badges

answered Dec 14, 2017 at 11:47

Joshua Mutinda's user avatar

There is no issue with your code.

Follow below two simple steps to send emails from phpmailer.

  • You have to disable 2-step verification setting for google account if you have enabled.

  • Turn ON allow access to less secure app.

answered Apr 12, 2018 at 7:24

Ravindra Miyani's user avatar

I’m using PHPMailer in a Simple Script For Send Email’s Through Gmail, and I’m getting an «Unknown Error» (At least for me!):

SMTP Error: Could not authenticate.
Error: SMTP Error: Could not
authenticate.

SMTP server error: 5.7.1 Username and
Password not accepted. Learn more at
535 5.7.1
http://mail.google.com/support/bin/answer.py?answer=14257
p38sm2467302ybk.16

I’ve read about Configure OpenSSL For SSL/TLS Connections, and I did it. Apache And PHP Are properly-Configured (With OpenSSL extension Running in PHP and mod_ssl running in Apache 2.2.16).

This is The PHP Script:

 <?php
  require_once ("PHPMailerclass.phpmailer.php");
  $Correo = new PHPMailer();
  $Correo->IsSMTP();
  $Correo->SMTPAuth = true;
  $Correo->SMTPSecure = "tls";
  $Correo->Host = "smtp.gmail.com";
  $Correo->Port = 587;
  $Correo->UserName = "foo@gmail.com";
  $Correo->Password = "gmailpassword";
  $Correo->SetFrom('foo@gmail.com','De Yo');
  $Correo->FromName = "From";
  $Correo->AddAddress("bar@hotmail.com");
  $Correo->Subject = "Prueba con PHPMailer";
  $Correo->Body = "<H3>Bienvenido! Esto Funciona!</H3>";
  $Correo->IsHTML (true);
  if (!$Correo->Send())
  {
    echo "Error: $Correo->ErrorInfo";
  }
  else
  {
    echo "Message Sent!";
  }
?>

The Username and Password are OK, And I tried in Thunderbird, without any problem.
I’ve also Used SSL Authentication and Port 465, getting the same Error.

Cœur's user avatar

Cœur

36.4k25 gold badges191 silver badges259 bronze badges

asked Oct 16, 2010 at 16:57

Alejandro Echeverri's user avatar

2

I encountered this problem. To get it working, I had to go to myaccount.google.com -> «Sign-in & security» -> «Apps with account access», and turn «Allow less secure apps» to «ON» (near the bottom of the page).

Alternatively you can follow this direct link to these settings

enter image description here

Joundill's user avatar

Joundill

6,42211 gold badges35 silver badges50 bronze badges

answered Sep 4, 2015 at 14:56

cwd's user avatar

7

Try this instead :

$Correo->Username = «foo@gmail.com»;

I tested it and its working perfectly without no other change

answered Oct 16, 2010 at 17:19

malletjo's user avatar

malletjomalletjo

1,78616 silver badges18 bronze badges

2

I received the same error and in mycase it was the password. My password has special characters.

If you supply the password without escaping the special characters the error will persist.

E.g $mail->Password = " por$ch3"; is valid but will not work using the code above .

The solution should be as follows: $mail->Password = "por$ch3";

Note the Backslash I placed before the dollar character within my password.
That should work if you have a password using special characters

answered Aug 1, 2012 at 9:57

Bubba's user avatar

BubbaBubba

1011 silver badge7 bronze badges

2

Because Allow less secure apps is no longer available

enter image description here

The solution was to enable 2-step verification and generate app password

app

select mail and computer from the list then click generate

copy the code shown in the box and replace your google password with your app password it works like a charm.

app password

answered Jun 28, 2022 at 2:10

Kym NT's user avatar

Kym NTKym NT

6309 silver badges28 bronze badges

1

I experienced the same error when configuring the WP-Mail-SMTP plugin in WordPress.

The problem would persist even when I have ‘triple checked’ the settings and login credentials, and am able to log in manually using a browser.

There’s a list of steps you can take to fix this.

  1. Create a new password for the Gmail account you want to use
  2. Enable less secure apps in Google Security settings
  3. Use the Display Unlock Captcha page to give your app or website permission to sign in to Gmail. Click Continue or follow the instructions.
  4. Sign in using the app or website. The smtp settings that work for me are 1) SMTP Host: smtp.gmail.com 2) SMTP port: 587 3) Encryption: TLS 4) Authentication: SMTP authentication 5) Username: example@gmail.com 6) Password: examplesecret

Greg's user avatar

Greg

20.9k17 gold badges81 silver badges106 bronze badges

answered Jul 20, 2017 at 8:24

pyfork's user avatar

pyforkpyfork

3,5972 gold badges20 silver badges18 bronze badges

1

my solution is:

  1. change gmail password
  2. on gmail «Manage your google Account» > Security > Turn on 3rd party app Access
  3. This the new step that i discover by UnlockingCaptcha that told in this site, the exact site is https://accounts.google.com/b/0/DisplayUnlockCaptcha, but maybe you want to read the former site first.

That all, hope it works for you

answered Jul 15, 2020 at 15:37

ibrahim saputra's user avatar

1

I received this error because of percentage signs in the password.

answered Dec 5, 2011 at 13:22

svandragt's user avatar

svandragtsvandragt

1,61320 silver badges37 bronze badges

1

For me I had a special characters in my password field, and I put it like $mail->Password = » por$ch3″ which work for gmail smpt server but not for other; so I just changed double quotes to single quotes and it works for me. $mail->Password = ‘ por$ch3’;

answered Jun 11, 2013 at 12:17

Rikin Adhyapak's user avatar

3

If you still face error in sending email, with the same error message. Try this:

$mail->SMTPSecure = 'tls';
$mail->Host = 'smtp.gmail.com';

just Before the line:

$send = $mail->Send();

or in other sense, before calling the Send() Function.

Tested and Working.

answered Jun 11, 2014 at 19:30

JackSparrow's user avatar

JackSparrowJackSparrow

9081 gold badge11 silver badges8 bronze badges

1

The other post is correct to resolve the issue but doesn’t address how to do it if the 2-step-verification is turned on. The option to allow the less secure apps is NOT available then. Here is an answer to how to do it:

a. Go to the URL of `https://myaccount.google.com/` and click `Sing-in and security`

b. Click on the app password. 

enter image description here

You will reach a page like this,

enter image description here

c. Create name of your app and generate a password for the respective app.  

d. Use that password acquired here inside the app.

This should resolve the issue.

answered May 20, 2018 at 10:16

Arefe's user avatar

ArefeArefe

10.4k16 gold badges101 silver badges159 bronze badges

0

I had the same issue and did all the tips including Gmail setting (e.g. less secure apps access) with no luck. But finally when I changed password to something different, for some reason it worked! FYI, the initial password did not have any special characters.

answered May 24, 2016 at 22:57

Ehsan's user avatar

EhsanEhsan

1,02211 silver badges20 bronze badges

  1. first go to https://myaccount.google.com
  2. Select Security tab
  3. Scroll down and select ‘Less secure app access’
  4. Turn on access

This will solve my “SMTP Error: Could not authenticate” in PHPMailer error.

answered Apr 29, 2020 at 13:07

ruwanmadhusanka's user avatar

ruwanmadhusankaruwanmadhusanka

7812 gold badges7 silver badges15 bronze badges

I had the same issue and did all the tips with no luck. Finally when I changed password to something different, for some reason it worked! (the initial password or the new one did not have any special characters)

answered Aug 18, 2019 at 14:06

user3809638's user avatar

0

The correct answer:
Go to «Manage your google accounts => Security => Signing in to Google => App passwords».
Generate your maill account password there (that will be used from other device)

answered Apr 13, 2022 at 9:49

Gosforth's user avatar

I had the same problem with authentication. The fix was to set up 2-step verification and create an application specific password for the device ( error messages for blocking the device will appear in your account settings->»Notifications and alerts» if you problem is the same with mine)

answered Jan 29, 2015 at 21:35

anu's user avatar

It was the selinux issue. I just updated the below given part in /etc/selinux/config file
SELINUX=permissive (it was SELINUX=enforcing before).
then just reboot the system by giving
reboot
Now the mail goes without any hassle.
Configuration

From Email Address : [noreply@yourdomain.com]
From Name : [your domain name]
SMTP Host   : smtp.gmail.com
Type of Encryption : SSL
SMTP Port : 465
SMTP Authentication  : YES
Username : [your mail id]
Password : [your password]

answered Feb 10, 2016 at 7:17

Jathin Prasad's user avatar

SMTP Error: could not authenticate
I had the same problem. The following troubleshooting steps helped me.

  • I turned off two-factor authentication in my gmail account.
  • I allowed less secure apps to access my gmail account. To get it working, I had to go to myaccount.google.com -> Sign-in & security -> Apps with account access, and turn Allow less secure apps to ON (near the bottom of the page).
  • At this step, when I tried to register a user, I would get the same error. Google would sent me a warning message that someone has my password and the login was blocked.
  • Gmail will then provide you with options. You either click whether the activity was yours or not yours. Click the option that the activity was yours.
  • Try registration again. It should now work.

cSteusloff's user avatar

cSteusloff

2,4376 gold badges27 silver badges50 bronze badges

answered Dec 14, 2017 at 11:47

Joshua Mutinda's user avatar

There is no issue with your code.

Follow below two simple steps to send emails from phpmailer.

  • You have to disable 2-step verification setting for google account if you have enabled.

  • Turn ON allow access to less secure app.

answered Apr 12, 2018 at 7:24

Ravindra Miyani's user avatar

Содержание

  1. SMTP Error (535): Authentication failed – How we Fixed it
  2. What is SMTP Authentication?
  3. Causes For the “Error 535: Authentication failed”
  4. 1. Incorrect Username and Password
  5. 2. Account Disabled
  6. 3. SMTP Authentication
  7. How to configure SMTP Authentication in a Mail client
  8. Enable SMTP auth in the server
  9. SMTP Auth in Plesk server
  10. Enable SMTP Authentication In cPanel
  11. Conclusion
  12. PREVENT YOUR SERVER FROM CRASHING!
  13. 6 Comments
  14. SMTP PHP yandex.ru Пароль не был принят сервером как верный! Как исправить?
  15. Smtp 535 ошибка
  16. Smtp 535 ошибка
  17. OTRS.ru
  18. smtp.yandex.ru не отправляет почту. [Решено]
  19. smtp.yandex.ru не отправляет почту. [Решено]
  20. Re: Проблема сбора почты с yandex
  21. Re: Проблема сбора почты с yandex
  22. Re: Проблема сбора почты с yandex
  23. Re: smtp.yandex.ru не отправляет почту.
  24. Re: smtp.yandex.ru не отправляет почту.
  25. Re: smtp.yandex.ru не отправляет почту.
  26. Re: smtp.yandex.ru не отправляет почту.
  27. Re: smtp.yandex.ru не отправляет почту.
  28. Re: smtp.yandex.ru не отправляет почту.
  29. Re: smtp.yandex.ru не отправляет почту.
  30. Re: smtp.yandex.ru не отправляет почту.
  31. Re: smtp.yandex.ru не отправляет почту.
  32. Сервер SMTP
  33. Читают тему:
  34. Мероприятия
  35. Отправка почты из 1С 8
  36. Настройка учетной записи электронной почты
  37. Ошибки, который могут появиться после настройки почты
  38. Исправление ошибок после настройки
  39. Ответить
  40. Добавить комментарий Отменить ответ
  41. Метки
  42. Рубрики
  43. Рубрики
  44. Свежие комментарии
  45. Страницы
  46. Метки
  47. Наши сайты
  48. Cookie и настройки приватности

SMTP Error (535): Authentication failed – How we Fixed it

by Sijin George | Apr 12, 2019

Everyone expect mails to work flawlessly, but that doesn’t always work.

Occasionally, mail servers may reject emails with some strange errors, such as “SMTP Error (535): Authentication failed

At Bobcares, we often get requests from customers to fix SMTP errors as part of our Technical Support Services.

Today, we’ll see how our Support Engineers help our customers to resolve such tough email errors.

What is SMTP Authentication?

Mail client like Outlook uses SMTP (Simple Mail Transfer Protocol) to send messages. Later, to download the mails E-mail clients use either POP or IMAP protocol.

But, for any reason, if the authentication fails, mail client like Outlook generates an appropriate error message.

“SMTP Error (535): Authentication failed” error is usually related to the bad user email settings in Microsoft Outlook.

That’s why, Email client configuration always need special attention. Now, let’s see the reasons behind this error and how our Support Engineers correct it for customers.

Causes For the “Error 535: Authentication failed”

From our experience in managing servers, we often see customers experiencing Auth error 535 due to the following reasons:

1. Incorrect Username and Password

When the username and password entered in the Email client are incorrect, it ends up in Error 535. Again, using the wrong the mail server can also cause authentication failures.

Usually, such mismatch in email login and password will be recorded in the mail server logs. This helps greatly in finding the exact email account with problems.

2. Account Disabled

Similarly, at times account can be disabled because of reasons like payment dues or spamming issue. This will also result in SMTP Error (535): Authentication failed.

So, it’s worth to login to the control panel and check the status of the customer account as well as the email account.

3. SMTP Authentication

If your email client do not have SMTP authentication turned ON, it can also result in error. Now, w e’ll check on how to enable SMTP Authentication in the server side and client side.

How to configure SMTP Authentication in a Mail client

Turning OFF SMTP Authentication in the email client, show up errors such as: “Server says: SMTP Error (535): Authentication failed: Authentication failure.”

Luckily, configuring SMTP authentication is a simple procedure. It involves modifying the SMTP configuration settings and making necessary changes.

For example, to turn ON SMTP Authentication in Mozilla Thunderbird,

  1. Open Thunderbird, go to Tools -> Account Settings -> Outgoing Server (SMTP)
  2. Select the outgoing server by clicking on it, then click the Edit button
  3. Under Security and Authentication, check the “username and password” option
  4. Fill in your email account username and click Ok.

Finally, configuration will show up as below.

Enable SMTP auth in the server

We already saw how to turn on SMTP Auth in email client. But, for this to work, the mail server should support SMTP Authentication. Let’s see how our Dedicated Engineers enable this for our customers.

SMTP Auth in Plesk server

SMTP connections on a Plesk server typically need authentication. Recently, one of our customers requested us to fix the “SMTP Error (535): Authentication failed”. Here, the server was not having SMTP auth turned ON. Therefore, our Support Engineers solved the issue by enabling “SMTP authentication” from his Plesk server.

The exact sequence of steps that we did were:

  1. We logged into Plesk
  2. We checked the SMTP authorization status under Tools & Settings > Mail Server Settings > Relay options.
  3. Finally, we ensured correct settings in Tools & Settings > Mail Server Settings > Enable SMTP service on port 587 on all IP addresses.

Enable SMTP Authentication In cPanel

Let’s have look on the steps to enable SMTP auth in cPanel server. SMTP authentication in cPanel allow sending messages via POP-before-SMTP. Here, once when the Outlook download the mails, there is no need to re-authenticate to send mails through SMTP.

Usually, SMTP authentication will be disabled in WHM by default. To enable SMTP Authentication , we go to WHM >> Service Configuration >> Service Manager and select the Antirelayd checkbox.

[Struggling with SMTP Auth problems? We can fix it for you.]

Conclusion

In short,“ SMTP Error (535): Authentication failed” error happens when there is a problem with SMTP configuration of email clients. Today, we saw how Bobcares solved “SMTP Error 535 Authentication failed”.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

And I Understand NONE of the above, can you explain this for mere mortals

We’ll be glad to chat with you (click on the icon at right-bottom).

i’m encountering this problem with a Mail.com account using K-9 Mail mobile program. I ‘ve retyped my password, and confirmed its validity by signing in via the web. The settings in K-9 such as port, etc., are the same as other other accounts for Mail.com.

Hi,
Please contact our support team via live chat

Authentication failed. Please check your username/password.
Server returned error: “535-5.7.8 Username and Password not accepted. Learn more at 535 5.7.8 https://support.google.com/mail/?p=BadCredentials fy26-20020a05622a5a1a00b0031f41ea94easm11180244qtb.28 – gsmtp , code: 53

Our Experts can help you with the issue, we’ll be happy to talk to you on chat (click on the icon at right-bottom).

Источник

SMTP PHP yandex.ru Пароль не был принят сервером как верный! Как исправить?

Пытаюсь пристроить скрипт для отправки писем.
часть скрипта.

Много где встречал этот скрипт, и заблудится негде. Но выдает ошибку
‘Проблемы с отправкой почты! 235 52 Пароль не был принят сервером как верный! Ошибка авторизации!
Испробовал ящик мэил и яндекс результат один. При этом этапы перед ним выполняются без ошибок. В чем я косячу.

  • Вопрос задан более двух лет назад
  • 1494 просмотра

Простой 2 комментария

020-05-29 20:58:04 SERVER -> CLIENT: 535 Authentication failed. Please verify your account by going to https://e.mail.ru/login?email=lesmanora@mail.ru
2020-05-29 20:58:04 SMTP ERROR: Password command failed: 535 Authentication failed. Please verify your account by going to https://e.mail.ru/login?email=lesmanora@mail.ru
SMTP Error: Could not authenticate.

020-05-29 20:50:20 SERVER -> CLIENT: 535 5.7.8 Error: authentication failed: Invalid user or password!
2020-05-29 20:50:20 SMTP ERROR: Password command failed: 535 5.7.8 Error: authentication failed: Invalid user or password!
SMTP Error: Could not authenticate.

таже беда с двумя ящиками

Возможно, yandex заблокировал попытки входа. Они так делают иногда, заставляя привязать телефонный номер. Надо зайти через вэб и подтвредить, на телефон придет код подтверждения.
Ссылку конкретно не помню (она у меня в ответе сервера smpt пришла, что-то типа ya.cc/blablabla ).
Ну или второй вариант попробовать использовать другой ящик, который точно работает в почтовом клиенте.
Естественно, это не единственный вариант вашей проблемы.

Также попробуйте просто скрипт:

Нужно убедиться, что PHPMailer установлен.
Скрипт стопудово рабочий, только что проверил.

Легче гуглопочту уговорить принимать почту напрямую(достаточно поставить крыж, что не безопастные входы разрещены) , чем майлру с яндексом.

Для них Вам придется еще SPF и DKIM настраивать.

Источник

Smtp 535 ошибка

Smtp 535 ошибка

Если отправка сообщений через SMTP не удается, SMTP сервер сообщает код ошибки, по нему можно определить, в чем проблема и как ее исправить. Наиболее распространенные ошибки указаны в списке ниже.

Requested mail action not taken: mailbox unavailable.

Требуемые почтовые действия, не предприняты: почтовый ящик недоступен (например, почтовый ящик занят).

Сервер не может получить доступ к почтовому ящику для доставки сообщения. Это может быть вызвано процессом чистки мертвых адресов на сервере, почтовый ящик может быть поврежден, или почтовый ящик может находиться на другом сервере, который в настоящее время не доступен. Также сетевое соединение могло быть разорвано во время отправки, или удаленный почтовый сервер не хочет принимать почту с вашего сервера по некоторым причинам (IP-адрес, черные списки и т.д.). Повторная попытка отправки письма на этот почтовый ящик может оказаться успешной.

Requested action aborted: local error in processing.

Требуемое действие прерывалось: ошибка в обработке.

Эта ошибка, как правило, возникает из-за перегрузки вашего Интернет провайдера или через ваш SMTP-релей отправлено слишком много сообщений. Следующая попытка отправить письмо может оказаться успешной.

Syntax error, command unrecognized.

Синтаксическая ошибка, неправильная команда (Это может включать ошибки типа слишком длинная командная строка).

Ваш антивирус/брандмауэр блокирует входящие/исходящие соединения SMTP. Вам следует настроить антивирус/брандмауэр для решения проблемы.

Syntax error in parameters or arguments.

Синтаксическая ошибка в параметрах или переменных.

Недопустимые адреса электронной почты или доменное имя почтового адреса. Иногда указывает на проблемы соединения.

Bad sequence of commands or this mail server requires authentication.

Неправильная последовательность команд.

Повторяющая ошибка 503 может свидетельствовать о проблемах соединения. Отклик 503 SMTP-сервера чаще всего является показателем того, что SMTP-сервер требует аутентификации, а Вы пытаетесь отправить сообщение без аутентификации (логин + пароль). Проверьте Общие настройки, чтобы убедиться в правильности настроек SMTP-сервера.

The host server for the recipient’s domain name cannot be found (DNS error).

У одного из серверов на пути к серверу назначения есть проблема с DNS-сервером либо адрес получателя не верный. Проверьте адрес получателя на правильность доменного имени (орфографические ошбки в доменном имени или несуществующее доменное имя).

Address type is incorrect or authentication required.

Убедитесь, что адрес электронной почты получателя верный, не содержит ошибок. Затем попробуйте повторно отправить сообщение. Другой причиной может быть то, что SMTP-сервер требует аутентификации, а Вы пытаетесь отправить сообщение без аутентификации (обычно аутентификация ESMTP, логин + пароль). Проверьте Общие настройки, чтобы убедиться в правильности настроек SMTP-сервера.

The Recipient’s mailbox cannot receive messages this big.

Размер сообщения (сообщение + все его вложения) превышает ограничения по размеру на сервере получателя. Проверьте размер сообщения, которое Вы подготовили для отправки, в частности, размер вложений, возможно, стоит разбить сообщения на части.

SMTP-сервер вашего провайдера, требует аутентификации, а Вы пытаетесь отправить сообщение без аутентификации (логин + пароль). Проверьте Общие настройки, чтобы убедиться в правильности настроек SMTP-сервера. Другой причиной может быть то, что ваш SMTP-сервер находится в черном списке сервера получателя. Или почтовый ящик получателя не существует.

Username and Password not accepted.

Проверьте настройки SMTP-сервера. Убедитесь в том, что логин и пароль введены правильно.

Recipient Address Rejected – Access denied.

Этот ответ почти всегда отправляется Антиспам фильтром на стороне получателя. Проверьте ваше сообщение соспам чекером или попросите получателя добавить вас в белый список.

Требуемые действия, не предприняты: почтовый ящик недоступен (например, почтовый ящик, не найден, нет доступа).

Отклик 550 SMTP-сервера означает, что емейл-адреса получателя нет на сервере. Свяжитесь с получателем устно, чтобы получить его емейл-адрес.
Ошибка 550 иногда может быть отправлена Антиспам фильтром. Другим случаем возврата отклика 550 может быть, когда сервер получателя не работает.

Requested mail action aborted: exceeded storage allocation or size of the incoming message exceeds the incoming size limit.

Требуемые почтовые действия прервались: превышено распределение памяти.

Почтовый ящик получателя достиг своего максимально допустимого размера. Другим случаем возврата отклика 552 может быть, когда размер входящего сообщения превышает лимит указанный администратором сети.

Requested action not taken – Mailbox name invalid.

Требуемые действия, не предприняты: имя почтового ящика, недопустимо (например, синтаксис почтового ящика неправильный).

Неверный адрес электронной почты получателя. Отклик 553 SMTP-сервера иногда возвращает почтовый сервер вашего Интернет провайдера. Это происходит, если у Вас нет подключения к Интернету у этого провайдера.

Передача данных не удалась

Отклик 554 SMTP-сервера возвращает антиспам-фильтр в случае, если не нравится емейл-адрес отправителя, или IP-адрес отправителя, или почтовый сервер отправителя (к примеру, они находятся в RBL). Вам нужно либо попросить отправителя добавить Вас в белый список, либо Вы должны принять меры, чтобы Ваш IP-адрес или ISP сервер был удален из RBL (Realtime Blackhole List).

Выражаю огромную благодарность всему коллективу, разработчика програмного обеспечения, службе поддержки. Раньше мучился с приложением для обратной почты кото Подробнее

Иванов Алексей Валерьевич ООО «Переезд39.рф»,

© Copyright, 2001-2020, ePochta
Email и почтовые рассылки, программа для рассылки писем, сервис массовой смс рассылки, смс шлюз

Лицензия №101172 Роскомнадзора на предоставление телематических услуг

OTRS.ru

Русскоязычное сообщество OTRS Helpdesk и OTRS ITSM

  • Темы без ответов
  • Активные темы
  • Поиск
  • Наша команда

smtp.yandex.ru не отправляет почту. [Решено]

Модератор: ykolesnikov

smtp.yandex.ru не отправляет почту. [Решено]

Сообщение alegator2222 » 04 окт 2018, 11:27

Re: Проблема сбора почты с yandex

Сообщение alegator2222 » 04 окт 2018, 14:21

Re: Проблема сбора почты с yandex

Сообщение alexus » 04 окт 2018, 19:24

С уважением,
Алексей Юсов

Prod: OTRS ITSM 5.0.14 on CentOS 7 x64 Linux with MySQL 5.7

Re: Проблема сбора почты с yandex

Сообщение alegator2222 » 05 окт 2018, 10:15

Принято спасибо, с получением почты разобрался, если кому интересно — Почта → Все настройки → Почтовые программы Там указать из каких папок забирать письма.
Не работает исходящая почта.
Передача сообщения не удалась. [04.10.2018 07:39] Can’t connect to smtp.yandex.ru: !
SendmailModule Kernel::System::Email::SMTP
SendmailModule::Host smtp.yandex.ru
SendmailModule::Port 465

В логе-
There was an error executing Execute() in Kernel::System::Console::Command::Maint::Email::MailQueue: Error: Message sending already in progress! Skipping.

Re: smtp.yandex.ru не отправляет почту.

Сообщение MArsMax » 10 окт 2018, 14:12

Похожая проблема (только с использованием внутреннего SMTP): исходящие письма помещаются в очередь «на отправку», но никуда из неё не уходят. Из ssh-консоли при этом сообщения, сформированные вручную, отправляются нормально.
В web-админке эти письма отображаются в разделе «Открытые сеансы связи»
Если через консоль почтовую очередь почистить принудительно — в админке они переходят в «Неудачные сеансы связи».
При попытке принудительной отправки из консоли (sudo -u otrs /opt/otrs/bin/otrs.Console.pl Maint::Email::MailQueue —send —force) выдаёт ошибку «Error: Message sending already in progress! Skipping. «. Очень странный получается «progress» — без какого-либо движения

Входящая почта при этом работает без проблем.

Re: smtp.yandex.ru не отправляет почту.

Сообщение alexus » 10 окт 2018, 17:47

С уважением,
Алексей Юсов

Prod: OTRS ITSM 5.0.14 on CentOS 7 x64 Linux with MySQL 5.7

Re: smtp.yandex.ru не отправляет почту.

Сообщение alegator2222 » 11 окт 2018, 15:38

SendmailModule——Kernel::System::Email::SMTP
SendmailModule::AuthUse——support@ipb01.ru
SendmailModule::Host————-smtp.yandex.ru
SendmailModule::Port—————465
Домен делегирован яндексу.
С support@ipb01.ru письма забираются нормально и заявки тоже создаются, но не отправляются.

Вот что в консоли-

715||2| support@ipb01.ru | HelpDesk@ipb01.ru | 2018-10-11 14:55:43 | -| Can’t connect to smtp.yandex.ru: ! |
716||2| support@ipb01.ru | HelpDesk@ipb01.ru | 2018-10-11 14:57:15 | -| Can’t connect to smtp.yandex.ru: ! |
717||2| support@ipb01.ru | HelpDesk@ipb01.ru | 2018-10-11 14:58:47 | -| Can’t connect to smtp.yandex.ru: ! |

Re: smtp.yandex.ru не отправляет почту.

Сообщение alegator2222 » 11 окт 2018, 15:56

Re: smtp.yandex.ru не отправляет почту.

Сообщение alexus » 11 окт 2018, 20:11

С уважением,
Алексей Юсов

Prod: OTRS ITSM 5.0.14 on CentOS 7 x64 Linux with MySQL 5.7

Re: smtp.yandex.ru не отправляет почту.

Сообщение alegator2222 » 12 окт 2018, 12:20

Re: smtp.yandex.ru не отправляет почту.

Сообщение led » 13 окт 2018, 08:36

Re: smtp.yandex.ru не отправляет почту.

Сообщение alegator2222 » 15 окт 2018, 11:07

Пробовал все три протокола, SMTP, SMTPS, SMTPTLS, безуспешно. Приложу логи, может по ним что то понятно. Повторюсь, сбор почты идет штатно, а вот отправка не происходит.

OTRS-otrs.Console.pl-Maint::Email::MailQueue-10 There was an error executing Execute() in Kernel::System::Console::Command::Maint::Email::MailQueue: [Mon Oct 15 11:05:07 2018] otrs.Daemon.pl: using SSL support of Net::SMTP 3.10 instead of SSLGlue at /opt/otrs/Kernel/cpan-lib/Net/SSLGlue/SMTP.pm line 12.

OTRS-otrs.Console.pl-Maint::Email::MailQueue-10 CommunicationLog(ID:9114,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:16082)::Kernel::System::MailQueue => Permanent sending problem or we reached the sending attempt limit. Message will be removed

OTRS-otrs.Console.pl-Maint::Email::MailQueue-10 CommunicationLog(ID:9114,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:16082)::Kernel::System::MailQueue => Message could not be sent! Error message: SMTP authentication failed: 535, 5.7.8 Error: authentication failed: Invalid user or password!

OTRS-otrs.Console.pl-Maint::Email::MailQueue-10 CommunicationLog(ID:9114,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Message,ObjectLogID:16082)::Kernel::System::Email => Error sending message using backend ‘Kernel::System::Email::SMTPS’.

OTRS-otrs.Console.pl-Maint::Email::MailQueue-10 CommunicationLog(ID:9114,AccountType:-,AccountID:-,Direction:Outgoing,Transport:Email,ObjectLogType:Connection,ObjectLogID:16083)::Kernel::System::Email::SMTP => SMTP authentication failed (SMTP code: 535, ErrorMessage: 535, 5.7.8 Error: authentication failed: Invalid user or password!

Использую пароль приложений, который генерируется в настройках почты.

Re: smtp.yandex.ru не отправляет почту.

Сообщение led » 15 окт 2018, 16:14

Возможно, у Вас в очереди сообщения, которые блокируют отправку.
Посмотрите, что находится в очереди:
shell> su otrs
shell> cd /opt/otrs/
shell> bin/otrs.Console.pl Maint::Email::MailQueue –list

Удалите ID сообщений, которые могут блокировать отправку, или, проще, удалите всю очередь:
shell> bin/otrs.Console.pl Maint::Email::MailQueue —delete-all

После этого отправьте новое письмо.
Для отправки через порт TCP/465 используйте SMTPS в SendmailModule.

Если эти действия не помогут, Вам нужно включать в OTRS дебаг обмена с почтовым сервером и смотреть в логах, почему не уходит почта.

Сервер SMTP

в настройках параметров обращения в отдел техподдержки что указать в поле Сервер SMTR.

Любой доступный вам SMTP сервер и надо указать.
SMTP сервер, грубо говоря, это компьютер, который занимается отправкой писем. При этом он может требовать авторизацию (для предотвращения неконтролируемой рассылки спама (рекламы)), а может и нет.
Вот у меня электронный почтовый ящик, например, noname@mail.ru
При таком раскладе я бы указывал так:
SMTP сервер: smtp.mail.ru
SMTP сервер требует авторизацию: да
Логин:
Пароль:

я указываю
SMTP сервер: smtp.bk.ru
пытаюсь отправить сообщение в техподдержку, пишет:
Электронное сообщение не отправлено.
Ошибка при вызове метода контекста (Подключиться): Аутентификация не прошла (SMTP error code 535, Incorrect authentication data)
а вообще не могу обновить релиз
пишет: Ошибка доступа к файлу ‘http://downloads.v8.1c.ru/tmplts/1c/AccountingBase/1_6_18_2/1cv8.cfu’
по причине:
Ошибка аутентификации при доступе к ресурсу: http://downloads.v8.1c.ru/tmplts/1c/AccountingBase/1_6_18_2/1cv8.cfu

> Ошибка при вызове метода контекста (Подключиться): Аутентификация не прошла (SMTP error code 535, Incorrect authentication data)
А вы пробовали перевести с английского? Вам написали — неверный логин или пароль

спасибо, задача решилась другим путем))))

Здравствуйте! подскажите, а каким путем вы решили вопрос об обновлении конфигурации? Дело в том, что у меня такая же проблема. Подскажите пожалуйста, как обновить релиз?

Здравствуйте! подскажите, пожалуйста, как вы решили эту задачу? Дело в том, что мне тоже выдает такую ошибку и я не могу обновить релиз. Подскажите пожалуйста, как это можно сделать?

вы получаете «SMTP error code 535, Incorrect authentication data»? Так введите правильный логин с паролем

Читают тему:

Мероприятия

  • Где купить СОФТ
  • Вакансии фирм-партнеров «1С»
  • Центры Сертифицированного Обучения
  • Интернет курсы обучения «1С»
  • Самоучители
  • Учебный центр № 1
  • Учебный центр № 3
  • Сертификация по «1С:Профессионал»
  • Организация обучения под заказ
  • Книги по 1С:Предприятию

1С бесплатно 1С-Отчетность 1С:ERP Управление предприятием 1С:Бесплатно 1С:Бухгалтерия 8 1С:Бухгалтерия 8 КОРП 1С:Бухгалтерия автономного учреждения 1С:Бухгалтерия государственного учреждения 1С:Бюджет муниципального образования 1С:Бюджет поселения 1С:Вещевое довольствие 1С:Деньги 1С:Документооборот 1С:Зарплата и кадры бюджетного учреждения 1С:Зарплата и кадры государственного учреждения 1С:Зарплата и управление персоналом 1С:Зарплата и управление персоналом КОРП 1С:Комплексная автоматизация 8 1С:Лекторий 1С:Предприятие 1С:Предприятие 7.7 1С:Предприятие 8 1С:Розница 1С:Управление нашей фирмой 1С:Управление производственным предприятием 1С:Управление торговлей 1СПредприятие 8

  • WWW.1С.ru
  • 1С:Предприятие 8
  • 1С Отраслевые решения
  • Образовательные программы
  • 1С:Линк
  • 1С:Консалтинг
  • 1С:Дистрибьюция
  • 1С для торговли
  • 1С-Онлайн
  • 1С Интерес
  • 1С:Образование

При использовании материалов активная прямая гиперссылка на перепечатанный материал обязательна.

Редакция БУХ.1С не несет ответственности за мнения и информацию, опубликованную в комментариях к материалам.

Редакция уважает мнение авторов, но не всегда разделяет его.

На указанный в форме e-mail придет запрос на подтверждение регистрации.

Мы используем файлы cookie, чтобы анализировать трафик, подбирать для вас подходящий контент и рекламу, а также дать вам возможность делиться информацией в социальных сетях. Если вы продолжите использовать сайт, мы будем считать, что вас это устраивает.

Отправка почты из 1С 8

Доброго времени суток, коллеги! Сегодня пытался настроить отправку сообщений из 1С и столкнулся с проблемой отправки сообщений. Как оказалось все упиралось в настройки gmail. Ну давайте все по порядку.

Настройка учетной записи электронной почты

Чтобы почта отправлялась нужно настроить основную учетную запись. Для этого нужно перейти:

На панели «Органайзер» не забудьте поставить флажок «Почтовый клиент», чтобы использовать возможности встроенного в программу почтового клиента для взаимодействий с помощью электронных писем (e-mail).

Когда вы нажмете на ссылку «Настройка системной записи электронной почты», то появиться диалог:

Закладка «Отправка писем»

Ошибки, который могут появиться после настройки почты

Сначала появилась такая ошибка:

Смотрел по форумам, менял настройки в 1С ничего не помогло и выходит другая:

Исправление ошибок после настройки

Вначале статьи показан скриншот по устранению неполадок, связанных со входом в аккаунт gmail. На нем подчеркнута ссылка, которая ведет к странице, на которой можно дать доступ непроверенным приложениям. Вот эта ссылка: https://www.google.com/settings/security/lesssecureapps. Переходя по ней вы увидите такую же страницу, как на скриншоте ниже:

Разрешение непроверенным приложениям доступ к вашему аккаунту

Надеюсь эта статья поможет вам решить проблему с настройкой почты в 1С 8.

Поделиться записью
Вам, возможно, понравится

Подскажите пожалуйста, использую бизнес почту мейл.ру, создал почту info@comix.by, мейл ру дал настроки:

Имя почтового ящика — это полное название вашего почтового ящика;
Сервер входящей почты IMAP-сервер — imap.mail.ru;
Порт для подключения по IMAP — 143 (при использовании шифрования STARTTLS) и 993 (при использовании шифрования SSL/TLS);
Сервер входящей почты POP3-сервер — pop.mail.ru;
Порт для подключения по POP3 — 995 (с шифрованием);
Сервер исходящей почты SMTP-сервер — smtp.mail.ru;
Порт для подключения по SMTP — 465 (с шифрованием);
Имя пользователя — это полное название вашего почтового ящика (логин и домен);

после ввода всей информации выдаёт ошибку:
Не удалось подключиться к серверу исходящей почты:Произошла ошибка при работе с SMTP. Код ошибки: 27
Не удалось подключиться к серверу входящей почты:Произошла ошибка при работе с IMAP. Код ошибки: 26. Ответ сервера: Command disabled. Please use STARTTLS first.
Что не так делаю?

Проверьте правильно ли вы указываете настройки почты, не изменилось ли что?

Спасибо, очень помогли! Долго не мог решить проблему, а оказывается все дело было в настройках почтового ящика GOOGLE.

Добрый день. Подскажите пож, приподключении пишет: Не удалось подключиться к серверу исходящей почты:Произошла ошибка при работе с POP3. Код ошибки: 2
с/у Ирина.

Здравствуйте, Ирина! Проверьте, правильно ли вы указали настройки.

Спасибо! Очень помогли!

Добрый день, ситуация аналогичная, выходит следующая ошибка:
Не удалось подключиться к серверу исходящей почты:Произошла ошибка при работе с POP3. Код ошибки: 10

Использую бизнесакаунт Mail.ru

Пробовали применить советы из статьи?

Ответить

Добавить комментарий Отменить ответ

Метки

Рубрики

  • 1С (30)
  • Запросы в 1С (7)
  • Обмен в 1С (6)
  • Обработки 1С (11)
  • Отчеты 1С (14)
  • Платформа 1С (5)
  • Реклама (3)
  • СКД (9)
  • Таблица значений в 1С (2)
  • Табличной поле в 1С (4)
  • Тестирование (3)
    • Тесты по СКД (3)
  • Типы данных в 1С (7)

Рубрики

  • 1С (30)
  • Запросы в 1С (7)
  • Обмен в 1С (6)
  • Обработки 1С (11)
  • Отчеты 1С (14)
  • Платформа 1С (5)
  • Реклама (3)
  • СКД (9)
  • Таблица значений в 1С (2)
  • Табличной поле в 1С (4)
  • Тестирование (3)
    • Тесты по СКД (3)
  • Типы данных в 1С (7)

В этой заметке показано, как найти настройки пользователей в конфигурациях с интерфейсом такси. А также дано описание, того как программно добавить и получить эти настройки.

В этой заметке будет изложено, как реализовать программно удобный механизм подбора на управляемых формах

Свежие комментарии

  • softmaker к записи Ошибка СУБД: Ошибка SQL: Таблица не найдена: _Reference. Как исправить?
  • Валерий к записи Ошибка СУБД: Ошибка SQL: Таблица не найдена: _Reference. Как исправить?
  • softmaker к записи Отправка почты из 1С 8

Страницы

Метки

Наши сайты

Этот сайт использует файлы cookie. Продолжая просматривать сайт, вы соглашаетесь с тем, что мы используем файлы cookie.

Cookie и настройки приватности

Мы можем запросить сохранение файлов cookies на вашем устройстве. Мы используем их, чтобы знать, когда вы посещаете наш сайт, как вы с ним взаимодействуете, чтобы улучшить и индивидуализировать ваш опыт использования сайта.

Чтобы узнать больше, нажмите на ссылку категории. Вы также можете изменить свои предпочтения. Обратите внимание, что запрет некоторых видов cookies может сказаться на вашем опыте испольхования сайта и услугах, которые мы можем предложить.

These cookies are strictly necessary to provide you with services available through our website and to use some of its features.

Because these cookies are strictly necessary to deliver the website, refuseing them will have impact how our site functions. You always can block or delete cookies by changing your browser settings and force blocking all cookies on this website. But this will always prompt you to accept/refuse cookies when revisiting our site.

We fully respect if you want to refuse cookies but to avoid asking you again and again kindly allow us to store a cookie for that. You are free to opt out any time or opt in for other cookies to get a better experience. If you refuse cookies we will remove all set cookies in our domain.

We provide you with a list of stored cookies on your computer in our domain so you can check what we stored. Due to security reasons we are not able to show or modify cookies from other domains. You can check these in your browser security settings.

These cookies collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are, or to help us customize our website and application for you in order to enhance your experience.

If you do not want that we track your visit to our site you can disable tracking in your browser here:

We also use different external services like Google Webfonts, Google Maps, and external Video providers. Since these providers may collect personal data like your IP address we allow you to block them here. Please be aware that this might heavily reduce the functionality and appearance of our site. Changes will take effect once you reload the page.

Google Webfont Settings:

Google Map Settings:

Google reCaptcha Settings:

Vimeo and Youtube video embeds:

The following cookies are also needed — You can choose if you want to allow them:

Источник

Adblock
detector

Код ошибки Значение Описание

0 Пользователей и 1 Гость просматривают эту тему.

  • 6 Ответов
  • 14114 Просмотров

Добрый день всем

у меня случилась грабля — отправляется почта но не на все ящики, точнее почти на все не отправляется, кроме некоторых моих.
раньше отправка была через php mail — на мои ящики приходило — а заказчик пишет что не может зарегиться — не приходит письмо
перепробовал все, Joomla 3.3
даже решил через smtp для яндекса — теперь выскакивает ошибка подключения
сейчас настройки для сервера следующие

отправка почты — Да
способ — smtp
email: имя@yandex.ru
отправитель: ИМЯ
авторизация: Да
защита: TLS
порт: 465
имя пользователя: имя
пароль: ***
server: smtp.yandex.ru

где то вскользь видел, что проблемы могут на стороне хостера — но не понимаю в чем они могут быть
не работает ни один способ отправки
хостер 1gb

нашел статейку, попробовал

Решение проблем связанных с отправкой почты в Joomla и VirtueMart

Самый простой способ отправки почты через функцию php mail, используйте этот способ отправки на вашем хостинге. Если вы в настройках указали способ отправки через php mail, а почта не отправляется, убедитесь, работает ли функция mail(). Для этого создайте в корне сайта файл test.php следующего содержания.

<?php
if (mail(«vasha_pachta@mail.ru», «Тема», «бла бла…nбла…бла….»))
  echo ‘OK’;
else
  echo ‘ERROR’;
?>
Запускаем файл: адрес_вашего_сайта/test.php, если после запуска скрипт выводит «ERROR», значит функция mail не работает на вашем сервере, стучите в техподдержку хостера, пускай подключают, все же 21 век на дворе). Если скрипт вывел «OK», значит письмо принято к отправке.

почта отправляется и приходит
значит mail() работает — там далее описано как править файл

После этого если письмо не дошло нужно подправить файл Joomla отвечающий за отправку почты. Открываем файл librariesphpmailerphpmailer.php находим примерно в 472 строке след. участок кода

1
$params = sprintf(«-oi -f %s», $this->Sender);
заменяем найденую строку на

1
2
$params = sprintf(«-oi -f %s», $this->Sender);
$params = «»;
В большинстве случаев проблема решается таким способом. Дело в том, что переменная $params используется в качестве 5го аргумента функции mail(), хотя обычно в функцию mail() достаточно передать 4 параметра.  На некоторых хостингах почта из Joomla не отправляется с этим 5ым параметром.
если и после этого письма не отправляются значит они попадают в спам на стороне хостинга (возможно дело в адресе отправителя) либо на принимающей стороне (посмотрите в папке спам).

проблема в том что это описание для старой Joomla — в новой все подругому

причем самое паскудное, что регистрация через mail() приходит только на мои пару ящиков
вот это ваще мистика :o :o :o
 то есть она ходит на мой gmail на мой mail

а на все остальные не ходит — эт ваще пипец какой то
мож конечно она работает через локальный комп на котором денвер стоит…

Дабы не создавать новые темы.спрошу здесь.Joomla стоит на локальном сервере.Настроил почту через Gmail. В настройках Gmail Установите переключатель Включить IMAP. Сделал.
В Joomla всё прописал по инструкции.При попытке отправить тестовое сообщение выводится ошибка.  SMTP Error: Could not authenticate.
Помогите разобраться пожалуйста.

Чет долго никто не закроет вопрос.  ;) Один из ответов на эту тему SMTP Error: Could not authenticate нашел на сайте здесь

« Последнее редактирование: 12.11.2022, 20:47:06 от avtomastersu »

Записан

бред полнейший
если напрямую не указывать и не включать пароль приложений, то достаточно настроить порты
а smtp надо в почте ращрешить

Записан

индивидуальная помощь: @SetAlexx

I’m using PHPMailer in a Simple Script For Send Email’s Through Gmail, and I’m getting an «Unknown Error» (At least for me!):

SMTP Error: Could not authenticate.
Error: SMTP Error: Could not
authenticate.

SMTP server error: 5.7.1 Username and
Password not accepted. Learn more at
535 5.7.1
http://mail.google.com/support/bin/answer.py?answer=14257
p38sm2467302ybk.16

I’ve read about Configure OpenSSL For SSL/TLS Connections, and I did it. Apache And PHP Are properly-Configured (With OpenSSL extension Running in PHP and mod_ssl running in Apache 2.2.16).

This is The PHP Script:

 <?php
  require_once ("PHPMailerclass.phpmailer.php");
  $Correo = new PHPMailer();
  $Correo->IsSMTP();
  $Correo->SMTPAuth = true;
  $Correo->SMTPSecure = "tls";
  $Correo->Host = "smtp.gmail.com";
  $Correo->Port = 587;
  $Correo->UserName = "foo@gmail.com";
  $Correo->Password = "gmailpassword";
  $Correo->SetFrom('foo@gmail.com','De Yo');
  $Correo->FromName = "From";
  $Correo->AddAddress("bar@hotmail.com");
  $Correo->Subject = "Prueba con PHPMailer";
  $Correo->Body = "<H3>Bienvenido! Esto Funciona!</H3>";
  $Correo->IsHTML (true);
  if (!$Correo->Send())
  {
    echo "Error: $Correo->ErrorInfo";
  }
  else
  {
    echo "Message Sent!";
  }
?>

The Username and Password are OK, And I tried in Thunderbird, without any problem.
I’ve also Used SSL Authentication and Port 465, getting the same Error.

Cœur's user avatar

Cœur

36.4k25 gold badges191 silver badges259 bronze badges

asked Oct 16, 2010 at 16:57

Alejandro Echeverri's user avatar

2

I encountered this problem. To get it working, I had to go to myaccount.google.com -> «Sign-in & security» -> «Apps with account access», and turn «Allow less secure apps» to «ON» (near the bottom of the page).

Alternatively you can follow this direct link to these settings

enter image description here

Joundill's user avatar

Joundill

6,42211 gold badges35 silver badges50 bronze badges

answered Sep 4, 2015 at 14:56

cwd's user avatar

7

Try this instead :

$Correo->Username = «foo@gmail.com»;

I tested it and its working perfectly without no other change

answered Oct 16, 2010 at 17:19

malletjo's user avatar

malletjomalletjo

1,78616 silver badges18 bronze badges

2

I received the same error and in mycase it was the password. My password has special characters.

If you supply the password without escaping the special characters the error will persist.

E.g $mail->Password = " por$ch3"; is valid but will not work using the code above .

The solution should be as follows: $mail->Password = "por$ch3";

Note the Backslash I placed before the dollar character within my password.
That should work if you have a password using special characters

answered Aug 1, 2012 at 9:57

Bubba's user avatar

BubbaBubba

1011 silver badge7 bronze badges

2

Because Allow less secure apps is no longer available

enter image description here

The solution was to enable 2-step verification and generate app password

app

select mail and computer from the list then click generate

copy the code shown in the box and replace your google password with your app password it works like a charm.

app password

answered Jun 28, 2022 at 2:10

Kym NT's user avatar

Kym NTKym NT

6309 silver badges28 bronze badges

1

I experienced the same error when configuring the WP-Mail-SMTP plugin in WordPress.

The problem would persist even when I have ‘triple checked’ the settings and login credentials, and am able to log in manually using a browser.

There’s a list of steps you can take to fix this.

  1. Create a new password for the Gmail account you want to use
  2. Enable less secure apps in Google Security settings
  3. Use the Display Unlock Captcha page to give your app or website permission to sign in to Gmail. Click Continue or follow the instructions.
  4. Sign in using the app or website. The smtp settings that work for me are 1) SMTP Host: smtp.gmail.com 2) SMTP port: 587 3) Encryption: TLS 4) Authentication: SMTP authentication 5) Username: example@gmail.com 6) Password: examplesecret

Greg's user avatar

Greg

20.9k17 gold badges81 silver badges106 bronze badges

answered Jul 20, 2017 at 8:24

pyfork's user avatar

pyforkpyfork

3,5972 gold badges20 silver badges18 bronze badges

1

my solution is:

  1. change gmail password
  2. on gmail «Manage your google Account» > Security > Turn on 3rd party app Access
  3. This the new step that i discover by UnlockingCaptcha that told in this site, the exact site is https://accounts.google.com/b/0/DisplayUnlockCaptcha, but maybe you want to read the former site first.

That all, hope it works for you

answered Jul 15, 2020 at 15:37

ibrahim saputra's user avatar

1

I received this error because of percentage signs in the password.

answered Dec 5, 2011 at 13:22

svandragt's user avatar

svandragtsvandragt

1,61320 silver badges37 bronze badges

1

For me I had a special characters in my password field, and I put it like $mail->Password = » por$ch3″ which work for gmail smpt server but not for other; so I just changed double quotes to single quotes and it works for me. $mail->Password = ‘ por$ch3’;

answered Jun 11, 2013 at 12:17

Rikin Adhyapak's user avatar

3

If you still face error in sending email, with the same error message. Try this:

$mail->SMTPSecure = 'tls';
$mail->Host = 'smtp.gmail.com';

just Before the line:

$send = $mail->Send();

or in other sense, before calling the Send() Function.

Tested and Working.

answered Jun 11, 2014 at 19:30

JackSparrow's user avatar

JackSparrowJackSparrow

9081 gold badge11 silver badges8 bronze badges

1

The other post is correct to resolve the issue but doesn’t address how to do it if the 2-step-verification is turned on. The option to allow the less secure apps is NOT available then. Here is an answer to how to do it:

a. Go to the URL of `https://myaccount.google.com/` and click `Sing-in and security`

b. Click on the app password. 

enter image description here

You will reach a page like this,

enter image description here

c. Create name of your app and generate a password for the respective app.  

d. Use that password acquired here inside the app.

This should resolve the issue.

answered May 20, 2018 at 10:16

Arefe's user avatar

ArefeArefe

10.4k16 gold badges101 silver badges159 bronze badges

0

I had the same issue and did all the tips including Gmail setting (e.g. less secure apps access) with no luck. But finally when I changed password to something different, for some reason it worked! FYI, the initial password did not have any special characters.

answered May 24, 2016 at 22:57

Ehsan's user avatar

EhsanEhsan

1,02211 silver badges20 bronze badges

  1. first go to https://myaccount.google.com
  2. Select Security tab
  3. Scroll down and select ‘Less secure app access’
  4. Turn on access

This will solve my “SMTP Error: Could not authenticate” in PHPMailer error.

answered Apr 29, 2020 at 13:07

ruwanmadhusanka's user avatar

ruwanmadhusankaruwanmadhusanka

7812 gold badges7 silver badges15 bronze badges

I had the same issue and did all the tips with no luck. Finally when I changed password to something different, for some reason it worked! (the initial password or the new one did not have any special characters)

answered Aug 18, 2019 at 14:06

user3809638's user avatar

0

The correct answer:
Go to «Manage your google accounts => Security => Signing in to Google => App passwords».
Generate your maill account password there (that will be used from other device)

answered Apr 13, 2022 at 9:49

Gosforth's user avatar

I had the same problem with authentication. The fix was to set up 2-step verification and create an application specific password for the device ( error messages for blocking the device will appear in your account settings->»Notifications and alerts» if you problem is the same with mine)

answered Jan 29, 2015 at 21:35

anu's user avatar

It was the selinux issue. I just updated the below given part in /etc/selinux/config file
SELINUX=permissive (it was SELINUX=enforcing before).
then just reboot the system by giving
reboot
Now the mail goes without any hassle.
Configuration

From Email Address : [noreply@yourdomain.com]
From Name : [your domain name]
SMTP Host   : smtp.gmail.com
Type of Encryption : SSL
SMTP Port : 465
SMTP Authentication  : YES
Username : [your mail id]
Password : [your password]

answered Feb 10, 2016 at 7:17

Jathin Prasad's user avatar

SMTP Error: could not authenticate
I had the same problem. The following troubleshooting steps helped me.

  • I turned off two-factor authentication in my gmail account.
  • I allowed less secure apps to access my gmail account. To get it working, I had to go to myaccount.google.com -> Sign-in & security -> Apps with account access, and turn Allow less secure apps to ON (near the bottom of the page).
  • At this step, when I tried to register a user, I would get the same error. Google would sent me a warning message that someone has my password and the login was blocked.
  • Gmail will then provide you with options. You either click whether the activity was yours or not yours. Click the option that the activity was yours.
  • Try registration again. It should now work.

cSteusloff's user avatar

cSteusloff

2,4376 gold badges27 silver badges50 bronze badges

answered Dec 14, 2017 at 11:47

Joshua Mutinda's user avatar

There is no issue with your code.

Follow below two simple steps to send emails from phpmailer.

  • You have to disable 2-step verification setting for google account if you have enabled.

  • Turn ON allow access to less secure app.

answered Apr 12, 2018 at 7:24

Ravindra Miyani's user avatar

За последние 24 часа нас посетили 11532 программиста и 1149 роботов. Сейчас ищут 165 программистов …


  1. STRELOK

    STRELOK
    Активный пользователь

    С нами с:
    4 янв 2010
    Сообщения:
    21
    Симпатии:
    0

    Доброго времени суток!

    Вчера и сегодня пытаюсь освоить отправку почты с почтового ящика Яндекса, используя класс phpMailer 5.1. Перепробовал, можно сказать, все варианты. Не отправляется письмецо…

    Чуть ниже, я привел код и результат выполнения этого кода. Далее изменения в коде и результат. *** — закрасил адреса почты и пароль.

    1. require_once «phpmailer/class.phpmailer.php»;
    2. $mail->Host       = «smtp.yandex.ru»;
    3. $mail->SMTPSecure = «ssl»;
    4. $mail->Host       = «smtp.yandex.ru»;
    5. $mail->Username   = «[b]***[/b]»;
    6. $mail->Password   = «test»;
    7. $mail->SetFrom(‘[b]***[/b]’);
    8. $mail->Subject = ‘This is a test’;
    9. $mail->Body = ‘This is a test of my mail system!’;
    10. $mail->AddAddress($address);
    11.  echo «Mailer Error: « . $mail->ErrorInfo;

    SMTP -> ERROR: Failed to connect to server: Unable to find the socket transport «ssl» — did you forget to enable it when you configured PHP? (24)
    SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.

    1. $mail->SMTPSecure = «tls»;

    Пустая страница

    1. //$mail->SMTPSecure = «tls»;

    SMTP -> ERROR: Failed to connect to server: Попытка установить соединение была безуспешной, т.к. от другого компьютера за требуемое время не получен нужный отклик, или было разорвано уже установленное соединение из-за неверного отклика уже подключенного компьютера. (10060)
    SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.

    1. //$mail->SMTPSecure = «tls»;

    SMTP -> FROM SERVER:220 smtp2.mail.yandex.net (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru)
    SMTP -> FROM SERVER: 250-smtp2.mail.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 42991616 250-STARTTLS 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES
    SMTP -> FROM SERVER:503 5.5.4 Error: send AUTH command first.
    SMTP -> ERROR: MAIL not accepted from server: 503 5.5.4 Error: send AUTH command first.
    The following From address failed: *** Mailer Error: The following From address failed: ***

    SMTP server error: 5.5.4 Error: send AUTH command first.

    SMTP -> FROM SERVER:220 smtp1.mail.yandex.net (Want to use Yandex.Mail for your domain? Visit http://pdd.yandex.ru)
    SMTP -> FROM SERVER: 250-smtp1.mail.yandex.net 250-8BITMIME 250-PIPELINING 250-SIZE 42991616 250-STARTTLS 250-AUTH LOGIN PLAIN 250 ENHANCEDSTATUSCODES
    SMTP -> ERROR: Password not accepted from server: 535 5.7.8 Error: authentication failed: Invalid user or password!
    SMTP -> FROM SERVER:250 2.0.0 Ok
    SMTP Error: Could not authenticate. Mailer Error: SMTP Error: Could not authenticate.SMTP -> ERROR: Failed to connect to server: Попытка установить соединение была безуспешной, т.к. от другого компьютера за требуемое время не получен нужный отклик, или было разорвано уже установленное соединение из-за неверного отклика уже подключенного компьютера. (10060)
    SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.

    Заранее спасибо!

    P.S.
    Спам я слать не собираюсь. Решился на обновление движка сайта, создание личного кабинета. Так вот отправка почты нужна для подтверждения регистрации и восстановления доступа.
    Чуть позже отправка новостей, если пользователь подписался на них.

  2. ssl в настройках PHP включи


  3. STRELOK

    STRELOK
    Активный пользователь

    С нами с:
    4 янв 2010
    Сообщения:
    21
    Симпатии:
    0

    А Вы не скажите, как это сделать?


  4. STRELOK

    STRELOK
    Активный пользователь

    С нами с:
    4 янв 2010
    Сообщения:
    21
    Симпатии:
    0

    Ну помогите пожалуйста! Ни в какую не идет!!!


  5. [vs]

    Команда форума
    Модератор

    С нами с:
    27 сен 2007
    Сообщения:
    10.534
    Симпатии:
    623


  6. [vs]

    Команда форума
    Модератор

    С нами с:
    27 сен 2007
    Сообщения:
    10.534
    Симпатии:
    623

PHPMailer is a great tool to send emails safely and easily using SMTP authentication.

But, sometimes this may fail due to incompatible server settings or incorrect SMTP configuration.

smtp error: could not authenticate” is one such problem reported by website owners when using PHPmailer to send emails.

At Bobcares, we resolve such email errors as part of our Outsourced Technical Support for web hosting providers.

Today, let’s see the top 5 reasons for this error and how our engineers fix it.

What is this “smtp error: could not authenticate” error?

Simply put, this error says:  “You try to connect to SMTP server, but it can’t authenticate you“.

So, it could mean,

  • The PHP application was able to connect to SMTP server, but the authentication failed.
  • Application was not able to connect to the SMTP server.

What’s wrong here? Let’s have a quick look.

Causes and Fixes for “smtp error: could not authenticate” error in phpmailer

1) Wrong SMTP authentication details

Each mail server uses an authentication system to validate users before they can connect and send emails.

When you send an email from your script, the mail server attempts to identify the user with the account’s username and password.

If this authentication fails, the mail server rejects the connection and users receive the error “smtp error: could not authenticate“.

Solution

We’ll ensure that correct username and password are given in the mail script.

In case of default email accounts, the full username(user@domain.com) should be given in the application.

Also, if the password was recently modified, it should be updated in the email application.

2) Wrong SMTP port and SMTP Host

Users should enter the mail server details in the “$mail->Host” field of the email application.

For example, if you use Gmail as your mail server, the hostname should be “smtp.gmail.com“.

Sometimes, a typo in the hostname or an inactive mail server result in this error.

Similarly, for port numbers, the default SMTP port is 25, but some mail servers use custom ports, such as 587, to avoid spam.

Also, some mail servers will be configured to allow emails only via SSL port 465.

It is also possible that some email providers restrict access to their SMTP port using firewall rules.

Incorrect port entry in SMTP settings or firewall restrictions may cause email delivery errors.

Solution

We’ll ensure the DNS connectivity of the mail server with the command.

dig mail.domain.com

Also, to identify the correct SMTP port and confirm connectivity to the SMTP port, we use the command:

telnet domain.com 25

We cross-check the SMTP settings in the application and make sure that correct SMTP host and port is used.

If we find any firewall restrictions, the IP should be whitelisted in the firewall.

3) SMTP encryption settings

For secure email transmission, most users prefer SMTP with encryption. SSL and TLS are the 2 encryption protocols used.

But, on some mail servers, SSL/TLS support may not be enabled or the existing SSL certificate may have expired.

What if users specify encryption in their application? Result is “smtp error: could not authenticate” error.

Solution

Our Support Engineers ensure that Apache and PHP are properly configured on the server with ‘mod_ssl‘ and ‘openssl‘ so that SSL can work on the server.

We’ll also verify the validity of mail server’s SSL certificate using the command:

openssl s_client -connect mail.example.com:25 -starttls smtp

So, the solution here is to properly configure SSL for the server or remove the encryption used in the SMTP settings.

4) Google blocks insecure access

Gmail enforces strict security restrictions.

If an app doesn’t meet these security standards, it may block access because these apps are easier to break into.

Users who authenticate to Gmail server receive the error “smtp error: could not authenticate” because Google considers username and password login as insecure.

Solution

Ideally, we reconfigure the app so that it meets the Google standards. If this is not possible, we’ll help website owners to loosen the security restrictions using the below steps.

  • Sign in to the Google admin console.
  • Go to Security > Basic settings.
  • Go to Less Secure Apps.
  • Turn on Allow less secure apps.

phpmailer smtp error: could not authenticate

Allow less secure apps in gmail account

5) Expired Password

This can happen once in a while.

Some servers are set to auto expire passwords and app maintainers forget to update them in time.

When the application tries to connect, the mail server could not validate the password.

Result is “smtp error: could not authenticate” error.

Solution

This usually happens when the account owner missed the notification email about password expiry.

In such cases, we reset the password and also update it in the email application.

We also make sure that the notification email is set correctly, and in some cases, we remove the password expiration set for the mailbox.

Conclusion

smtp error: could not authenticate” is a common error when users send emails via PHPMailer using SMTP authentication. This error occurs when the application can’t establish an SMTP connection to the mail server. Today, we’ve seen the top 5 causes of this error and how our Support Engineers fix them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

SEE SERVER ADMIN PLANS

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Smtp error could not authenticate перевод
  • Slrr 606 ошибка как исправить
  • Smtp error could not authenticate yandex wordpress
  • Smtp error could not authenticate mail error smtp error could not authenticate
  • Smtp error could not authenticate joomla

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии