PHPMailer with IIS

Jan van de Venter 1 Reputation point
2022-03-24T11:16:47.96+00:00

PHPMailer works on website server but on localhost. For years I wrote PHP scripts to send email from websites to clients with PHP and PHPMailer and it worked beautifully on localhost (testing) and webservers. Now that I want to do the same on a new project I dicovered that PHPMailer gives HTML internal error 500, but the same script works very nice on the webserver(normally LINUX). What has changed on Windows 10?

Windows development Internet Information Services
{count} votes

1 answer

Sort by: Most helpful
  1. Jan van de Venter 1 Reputation point
    2022-03-28T08:07:38.027+00:00

    I solved the problem. First of all carefully studied PHMailer documentation for the latest version and made some changes.
    I discovered that the information received was wrong.

    1. The mail server is an exchange server not POP3.
    2. SMTPSecure for PHPMailer must be TLS.
    3. The SMTP port is 587 not 465

    Everything is now working fine on IIS and the webserver

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.