$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!' // optional - MsgHTML will create an alternate automaticallyĮcho $e->errorMessage() //Pretty error messages from PHPMailerĮcho $e->getMessage() //Boring error messages from anything else! $mail->Subject = 'PHPMailer Test Subject via mail(), advanced' $mail->Port = 465 // set the SMTP port for the GMAIL server $mail->Host = "" // sets GMAIL as the SMTP server $mail->SMTPSecure = "ssl" // sets the prefix to the servier $mail->SMTPAuth = true // enable SMTP authentication $mail->SMTPDebug = 2 // enables SMTP debug information (for testing) $mail->IsSMTP() // telling the class to use SMTP $mail = new PHPMailer(true) // the true param means it will throw exceptions on errors, which we need to catch Solved the problem - PHPMailer - SMTP ERROR: Password command failed when send mail from my server require_once('') In addition I had to clear the captcha (the funny picture, which asks you to rewrite a word or a sentence when logging into any account nowadays too many times) : This worked the first time, but few hours later, probably because I was doing a lot of testing the problem reappeared and was not fixable using the above method.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |