KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using PHPMailer to send automated e-mails from my website and while testing, I noticed that all e-mails sent by php mailer are generating the following warning on the recipients end: This message may not have been sent by: foo@gmail.com Learn more Report phishing I was wondering if there is a way to avoid this? PHP Mailer code: //mail functions require("mailer/class.phpmailer.php"); require("mailer/class.smtp.php"); require("mailer/class.pop3.php"); $mail = new PHPMailer(); $mail->IsSMTP(); $mail->Host = "relay-hosting.secureserver.net"; $mail->Port = 25; $mail->IsHTML(true); $mail->Username = "foo@gmail.com"; // SMTP username $mail->Password = "pass"; // SMTP password $mail->From = "foo@gmail.com"; $mail->FromName = "FOO"; $mail->AddAddress("fOO@gmail.com", "WIDB"); $mail->AddReplyTo("foo@gmail.com"); //$mail->AddAddress("foo@gmail.com"); // name is optional $mail->WordWrap = 50; // set word wrap to 50 characters //$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments //$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name $mail->IsHTML(true); // set email format to HTML $mail->Subject = 'Foo - Transaction Receipt'; $mail->Body = $message; $mail->AltBody = "nothing"; //send mail $mail->Send(); I am using GMail and I have SMTP enabled...
Tags (comma-separated)
Save Edits
Cancel