require 'send/PHPMailerAutoload.php';
$mail = new PHPMailer();
//Enable SMTP debugging.
$mail->SMTPDebug = 0;
//Set PHPMailer to use SMTP.
$mail->isSMTP();
//Set SMTP host name
$mail->Host = "smtp.gmail.com";
//Set this to true if SMTP host requires authentication to send email
$mail->SMTPAuth = true;
//Provide username and password
$mail->SMTPAuth = true;
//Provide username and password
$mail->Username = "admin@admin.com";
$mail->Password = "a23k234tbk";
//If SMTP requires TLS encryption then set it
$mail->SMTPSecure = "tls";
//Set TCP port to connect to
$mail->Port = 587;
$mail->From = "admin@admin.com";
$mail->FromName = "dummy.com";
$mail->addAddress($user_email);
$mail->isHTML();
$mail->Subject = "dummy";
$mail->Body = $table4 ? $table4 :"";
if($mail->send())
{
header("Location:email_user.php?result=success");
echo "";
}
else
{
echo '';
}
}
So my question is; is their additional configuration that should be done for G suit gmail accounts.
the code works fine the problem only happens when i use a different "from account". When using a normal gmail account like *@gmail.com it works but it fails when using G suit account like *@yourdomainname.com.