简体   繁体   English

我正在使用 PHPMailer,但在 gmail 中未收到邮件

[英]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.

相关问题 Gmail收到的邮件,但其他提供商PHPMailer没有收到 - Mail received by Gmail but not others provider PHPMailer 如果发件人是Yahoo邮件,则Gmail不会收到phpmailer电子邮件 - phpmailer email not received by gmail if sender is yahoo mail phpmailer 在本地主机上工作,但是当我将它上传到我的 ubuntu 服务器时,它给了我错误并且邮件没有发送(我使用的是 gmail smtp) - phpmailer working on localhost but when i upload it on my ubuntu server it gives me error and mail is not sending(I am using gmail smtp) 使用带有 Gmail 帐户的 PHPMailer 发送邮件 - Sending a mail using PHPMailer with Gmail Account 使用phpmailer发送后收不到邮件? - mail is not received after sending using phpmailer? 我无法使用PHPMailer发送邮件 - I am unable to send mail with PHPMailer 为什么我在Phpmailer中收到邮件延迟? - Why i am getting mail delayed in Phpmailer? 我无法使用带有PHPMailer和Gmail SMTP的联系表发送邮件 - i can't Send Mail Using Contact Form With PHPMailer and Gmail SMTP 我如何通过php smtp服务器使用phpmailer发送邮件 - how can i send mail using phpmailer thru gmail smtp server 如何使用 PHPMailer 抑制错误(尽管有错误消息,但邮件发送和接收成功)? - How do i suppress errors using PHPMailer (mail is sent and received successfully in spite of error msg)?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM