Compare commits

..

No commits in common. "6135de4e5e141178f4c2c590768cc488867fff3c" and "e77de8e40b3526e9cf78b62016d5306b525547e7" have entirely different histories.

2 changed files with 2 additions and 6 deletions

View File

@ -61,7 +61,6 @@ if (isset($_POST) && !empty($_POST)){
}
// send email IFF no NULL fields
if ($usePort && $useEncryption && $recipient && $replyTo){
$output .= '<< using port: ' . $usePort . ' with encryption: ' . $useEncryption . ' >><br>';
$body = 'This is a test message from the Simple PHPMailer Test Script. You may ignore this message.';
$subject = 'PHPMailer Test-Script Message';
$mailResult = sendEmail($SMTP['timeout'], $SMTP['hostname'], $usePort, $useEncryption, $SMTP['username'], $SMTP['password'], $recipient, $replyTo, $body, $subject);
@ -78,7 +77,7 @@ if (isset($_POST) && !empty($_POST)){
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Email Port Test</title>
<link rel="stylesheet" href="styles.css" integrity="sha384-9XO3MZfsbW7fC5tHf9nrGgI9BNaS4AEP0OoG6qQAY4PtIfCXaDAGObt6qBEHpyTa" crossorigin="anonymous">
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>Email Port Test</h1>

View File

@ -29,16 +29,13 @@ 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);