Php mailer gmail smtp error could not authenticate
While connecting your email account through the SMTP method, you may encounter SMTP Error: Could not authenticate error. SMTP connection can't be established If you have
turned on the 2-factor authentication for your email account so you either need to turn it off or generate an app password for your email account. That app password can be used in your SalesHandy account to connect the email account via SMTP method. Many email providers allow users to generate an app-specific password and every email service provider has different methods of creating app passwords. Please follow the below articles to know the steps of generating app passwords
(Application-Specific Passwords) as per your email provider. Please note that you need to use the generated password while connecting your email account with SalesHandy. Although it happens rarely, sometimes, the
email providers keep the SMTP connection disabled so it can't be connected via the SMTP method. In that case, users are requested to reach out to their email service provider to get SMTP enabled. Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later. Still need help? Contact Us Contact Us Last updated on July 27, 2022I want to send emails in Gmail using PHP Mailer in a Simple Script but I am getting an error: 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 configured the OpenSSL For SSL/TLS Connections. This is my PHP Script: IsSMTP(); $Correo->SMTPAuth = true; $Correo->SMTPSecure = "tls"; $Correo->Host = "smtp.gmail.com"; $Correo->Port = 587; $Correo->UserName = ""; $Correo->Password = "gmailpassword"; $Correo->SetFrom('','De Yo'); $Correo->FromName = "From"; $Correo->AddAddress(""); $Correo->Subject = "Prueba con PHPMailer"; $Correo->Body = " Can someone help me solve this issue? Please check these things before submitting your issue:
Problem descriptionWhen i trying send message from smtp.gmail.com, with ssl, or tls, or different ports, doesnt matter,
it's throw exception to me. Code to reproduce$mail->isSMTP(); $mail->SMTPDebug = 2; $mail->Host = "smtp.gmail.com"; $mail->SMTPAuth = true; $mail->SMTPSecure = "ssl"; $mail->Port = 465; $mail->CharSet = "UTF-8"; $mail->Username = ""; $mail->Password = "*******"; $mail->setFrom("", "Alex"); $mail->Subject = "Тест, отправка письма"; $mail->msgHTML("Message"); $mail->addAddress(""); if (!$mail->send()) { $mail->ErrorInfo; } else { echo "123"; } Debug output
How do I fix SMTP authentication error in Gmail?To fix this problem you need:. Make sure that you've entered the correct password.. Check if you have enabled the two-factor authentication. ... . Enable less secure apps access in your Google account settings. ... . Log out from all the other Google accounts. ... . Make sure that your password doesn't contain # or ^ symbols.. Could not authenticate mailer error SMTP error could not authenticate?Error: SMTP error: could not authenticate
This error indicates that the client could not authenticate with the email server. It can be the cause of multiple reasons, for example: The user did not enter valid credentials when logging in. The user did not verify with the multi-factor authentication mechanisms enabled.
How do I fix SMTP authentication error?SMTP connection can't be established If you have turned on the 2-factor authentication for your email account so you either need to turn it off or generate an app password for your email account. That app password can be used in your SalesHandy account to connect the email account via SMTP method.
How use Gmail SMTP in PHP?Writing the PHP Code to Send Email using Gmail SMTP. Step 1: Download PHPMailer library from this github link. ... . Step 2: Writing the PHP Code to make an SMTP connection. ... . Step 3: Include packages and files for PHPMailer and SMTP protocol: ... . Step 4: Initialize PHP Mailer and set SMTP as mailing protocol:. |