[英]I am using PHPMailer but mail not received in gmail
I received the mail continuously fine but suddenly I didn't receive any mail.我一直很好地收到邮件,但突然我没有收到任何邮件。 I don't know what happened with my code also I didn't get any error in my error log file as well.我不知道我的代码发生了什么,我的错误日志文件中也没有任何错误。 I am using it on Godaddy server我在 Godaddy 服务器上使用它
$mails = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "smtp.gmail.com";
$mail->SMTPAuth = true;
$mail->Port = 587;
$mail->Username = "mymail@gmail.com";
$mail->Password = "myPassword";
$mail->From = "foo@gmail.com";
$mail->FromName = "John Doe";
$mail->AddAddress('foobar@foobar.com');
$mail->IsHTML(true);
$mail->Subject = "John Doe Lead Update";
$mail->Body = '
<h2>Mahindra Campaign Data</h2>';
if($mail->send()){
echo 'Message sent';
}
else
{
echo 'Mailer error' .$mail->ErrorInfo;
}
May be GoDaddy server issue.可能是 GoDaddy 服务器问题。 If you are using shared hosting, there will be some limitations for sending emails.如果您使用共享主机,发送电子邮件会有一些限制。 You can use third party services like mailchimp or you can use Amazon email services.您可以使用 mailchimp 等第三方服务,也可以使用 Amazon email 服务。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.