cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution
Highlighted

SMTP Error: Could not authenticate.

I'm trying to use PhpMailer it only works when i used this conf

$mail->SMTPDebug = 0;                                       // Enable verbose debug output
$mail->isSMTP();  
$mail->SMTPSecure = 'tls';                                  // Set mailer to use SMTP
$mail->Host       = 'localhost';  // Specify main and backup SMTP servers   
$mail->SMTPAutoTLS = false;
$mail->SMTPAuth   = false;     
$mail->Port = 25;   

But the problem is the message is going to the spam and this message apear "This message seems dangerous"

and that's because the SMTP is not authenticated.
When i try to authenticate the SMTP with this code

//Server settings
$mail->isSMTP(); 
$mail->Host = 'GoDaddy host name'; 
$mail->SMTPAuth = true; 
$mail->Username = 'godaddy email';
$mail->Password = 'godaddy password';
$mail->SMTPSecure = 'tls'; 
$mail->Port = 587; 

I get this message
SMTP Error: Could not authenticate.

1 REPLY 1
Super User I
Super User I
Solution

Re: SMTP Error: Could not authenticate.

Hello and thank you for reaching out to the community.

Check out this GoDaddy Community Solution to see if it resolves your issue as well: https://www.godaddy.com/community/Managing-Email/Can-t-Get-GoDaddy-Hosting-and-PHPMailer-to-work/m-p...

Very Respectfully,

Drew Davis
Navy Veteran and Entrepreneur | GoDaddy Pro user | "Proud to be serving others!"

*** Please note that I offer free advice on this forum. Please feel free to give me KUDOS on this topic/discussion; mark my comment as ACCEPTED SOLUTION if you believe I've helped solved your issue. Thanks! ***