dronthpi05943 2016-08-10 01:54
浏览 81
已采纳

Nginx 405不允许 - PHPMAILER

I uploaded a website with a PHPMailer v5. It works well in localhost but when I tried it online, Nginx-405-not-allowed page shows. below is my configuration for my mail function.

  require 'vendor/phpmailer/phpmailer/PHPMailerAutoload.php';
  $mail = new PHPMailer(true);
  $mail->isSMTP();
  $mail->Host = 'smtp.gmail.com';
  $mail->SMTPAuth = true;
  $mail->Username = 'myaccount@gmail.com';
  $mail->Password = 'mypassword';
  $mail->SMTPSecure = 'tls';
  $mail->Port = 587;
  • 写回答

1条回答 默认 最新

  • doq70020 2016-08-10 04:03
    关注

    I found my answer. The problem is in the web server provider. It seems like there are some web servers don't accept smtp.gmail.com and thus I created an email from the domain and set the host, username, password and as well as the port to what the web server provider provides. Hope you guys visit here will solve your questions.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥15 clion的参数提示怎么关闭
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀