From 046ed5cfc2e0044cbd171cc5d9e2b876cc99a7a3 Mon Sep 17 00:00:00 2001 From: 7u83 <7u83> Date: Thu, 16 Apr 2020 07:23:12 +0000 Subject: [PATCH] Uses $mailFrom, and in addition there is no certificate verfification for SMTP, currently --- submit.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/submit.php b/submit.php index aeca3a2..d23dcaa 100644 --- a/submit.php +++ b/submit.php @@ -413,9 +413,18 @@ $file = "$resultnam.pdf"; if ($_POST['sendmail']=='yes'){ $subj = "Kostenerstattungsantrag ueber".calcSum()." EUR"; + $mail = new PHPMailer\PHPMailer\PHPMailer(); + $mail->SMTPOptions = array( + 'ssl' => array( + 'verify_peer' => false, + 'verify_peer_name' => false, + 'allow_self_signed' => true + ) + ); + $mail->IsSMTP(); - $mail->setFrom("noc@wikimedia.de"); + $mail->setFrom($mailFrom); $mail->Subject = $subj; $mail->Body = "Kostenerstattungsantrag ..."; $mail->AddAddress($mailDest);