Trying to send send email using php, uploaded to my server the files:timeoutfix.diff,smtp.inc.php,phpmailer.inc.php and still the mail is not sent. anyone can help me?
IsSMTP(); // set mailer to use SMTP
$mail->From = "test@test.com";
$mail->FromName = " Gartner Israel";
$mail->Host = "62.219.91.15"; // specify main and backup server
$mail->AddAddress("myemail@gmail.com");
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Email from test website";
$mail->Body = $Body;
if ($mail->Send();){
print "";
}
else{
print "";
}
?>
2 个解决方案
#1
0
I believe the issue is related to the "from" field - presumably you do not own test.com? Try removing this, and testing the send with your default php send server. If that works, then you can look into using a more useful address there.