$mail = new PHPMailer();
$mail->SetLanguage("en", '/phpmailer/language/');
$mail->IsSMTP();
$mail->Host = "smtp.gmail.com";
$mail->Port = 587;
$mail->SMTPAuth = true;
$mail->Username = "***@gmail.com";
$mail->Password = "***";
$mail->From = "***@gmail.com";
$mail->FromName = "Team";
$mail->AddAddress($rs['email'], $rs['username']);
$mail->AddReplyTo("***@gmail.com");
$mail->isHTML(true);
$mail->Subject = "hello";
$this->assign('user', $rs);
$mail->Body = $this->fetch('/email/email_activation_html.tpl');
if($mail->Send()){
echo "sent";
return true;
} else {
$this->debug($mail->ErrorInfo);
}
I know the email is correct so is the pw. I just keep getting the error: The following From address failed. looked all over the internet and forum but everyone basically has same code as me...so not sure whats up? I also tried $mail->SMTPDebug = 2;