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;