diff --git a/php/PHPMailer/mailer.php b/php/PHPMailer/mailer.php index 34c62dc..80cb6f5 100644 --- a/php/PHPMailer/mailer.php +++ b/php/PHPMailer/mailer.php @@ -29,13 +29,16 @@ function sendEmail($timeout, $hostname, $usePort, $useEncryption, $username, $pa $mail->SMTPAuth = true; $mail->Username = $username; $mail->Password = $password; + $mail->Port = $usePort; // encryption setting if ($useEncryption === 'ssl'){ $mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS; } elseif ($useEncryption === 'starttls'){ $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; + } elseif ($useEncryption === 'none'){ + $mail->SMTPSecure = false; + $mail->SMTPAutoTLS = false; } - $mail->Port = $usePort; // recipients $mail->setFrom($replyTo);