Message was not sent..Mailer error
Hello,
I am using phpmailer with smtp.gmail.com with authentication but getting this error:
Message was not sent..Mailer error: SMTP connect() failed.
Thanks,
-
Hello :) Do you notice any output to /var/log/exim_mainlog when attempting to send the message? What are you using for the "host" setting in your mailer script? Does changing it to "localhost" make a difference? Thank you. 0 -
Dear, Here is my script: IsSMTP() ; $mail->Host = 'smtp.gmail.com'; $mail->Port = 465; $mail->SMTPAuth = true ; $mail->SMTPSecure = "ssl"; $mail->Username = "xyzomair@gmail.com"; $mail->Password = "password"; //build the message $mail->IsHTML(true); //$mail->From = "xyzomair@gmail.com"; $mail->AddAddress("xyzomair@gmail.com"); $mail->Subject = "An HTML Message"; $mail->Body = "Hello, my friend! \n\n This message uses HTML entities!"; if($mail->Send()) { echo 'Message is sent'; } else { echo 'Message was not sent..'; echo 'Mailer error: ' . $mail->ErrorInfo; } ?>
and exim not generate any log attempting to send the message: Thanks,0
Please sign in to leave a comment.
Comments
3 comments