W
W
webov_web2019-08-29 12:30:49
PHP
webov_web, 2019-08-29 12:30:49

PHPMailer Error 500 Internal Server Error?

I'm trying to send a letter via Yandex smtp. When submitting the form, I get the error "send.php Status Code: 500 Internal Server Error"
What I did:
1. Changed the MX record. In the domain settings in the connect.yandex.ru service, it says "The domain is confirmed and ready to go"
2. Uploaded PHPMailer to the hosting. Three files in the folder /PHPMailer/PHPMailer/ (Exception.php, PHPMailer.php, SMTP.php) and send.php with my settings to the root of the site.
A piece of send.php:

$mail->Host       = 'smtp.yandex.com';  // Specify main and backup SMTP servers
    $mail->SMTPAuth   = true;                                   // Enable SMTP authentication
    $mail->Username   = '[email protected]';                     // SMTP username
    $mail->Password   = 'password';                               // SMTP password
    $mail->SMTPSecure = 'ssl';                                  // Enable TLS encryption, `ssl` also accepted
    $mail->Port       = 465;

In the line "$mail->Password" I use the password for the application, which is issued in the mail settings in Yandex.
What could be wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
rubtsoff, 2019-09-02
@rubsoff

many options
1) hosting blocked access to port 465
2) the script does not work under your php version
3) an error in the script

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question