Article ID: 1754
Last updated: 06 Dec, 2024
Objective: We have disabled the support for script through mails without authentication along with the up-gradation to Plesk. If a website uses a feedback or any mail sending script, then it has to be updated to ensure that it uses authenticated SMTP relay. Part 01 : Follow the steps to configure script through mails with PHPMailer SMTP Authentication
The traditional mail() function in PHP does not support SMTP authentication. Hence we recommend the use of PHPMailer class function, which is an open source and secure script for enabling the same: PHPMailer Installation and sample code - https://github.com/PHPMailer/PHPMailer Note : The PHPMailer class files can also be found in the attached archive with this KB article. This attached archive has enough examples scripts ready for your help. Step 01 : Please create an email ID in your hosting account in advance for use in SMTP authentication.
Step 02 : Please update your codebase, downloaded from the GitHub link above, in the /src/PHPMailer.php file starting from line 282 with the email ID and password you created for SMTP authentication, parameters shown below. (Attached Screenshots below)
public $Host = 'localhost'; --> here use your email server hostname as mail.<your-domain-name>
|