Код: Выделить всё
if(strlen(CFG_EMAIL_SMTP_LOGIN)>0 or strlen(CFG_EMAIL_SMTP_PASSWORD))
{
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = CFG_EMAIL_SMTP_LOGIN; // SMTP username
$mail->Password = CFG_EMAIL_SMTP_PASSWORD; // SMTP password
}
Код: Выделить всё
else
{
//Whether to use SMTP authentication
$mail->SMTPAuth = false;
}