1
0
Fork 0

recode form output, tested db entries and send mails, remove not needed tabindex

Dieser Commit ist enthalten in:
Ortwin Pinke 2024-09-03 16:01:48 +02:00
Ursprung 5ffc456b15
Commit 1767e83645

Datei anzeigen

@ -123,16 +123,16 @@ function enwiSendMailSmtp(string $html, string $subject, array $recipients, arra
if (isset($recipients[0]) && is_array($recipients[0])) {
for ($i = 0, $n = count($recipients); $i < $n; $i ++) {
if (strlen($recipients[$i]['email'])) {
$mail->AddAddress($recipients[$i]['email'], ((strlen($recipients[$i]['name'])) ? html_entity_decode($recipients[$i]['name'], ENT_QUOTES, $encoding) : $recipients[$i]['email']));
$mail->AddAddress($recipients[$i]['email'], ((strlen($recipients[$i]['name']) > 0) ? html_entity_decode($recipients[$i]['name'], ENT_QUOTES, $encoding) : $recipients[$i]['email']));
}
}
} else {
$mail->AddAddress($recipients['email'], ((strlen($recipients['name'])) ? html_entity_decode($recipients['name'], ENT_QUOTES, $encoding) : $recipients['email']));
$mail->AddAddress($recipients['email'], ((strlen($recipients['name']) > 0) ? html_entity_decode($recipients['name'], ENT_QUOTES, $encoding) : $recipients['email']));
}
// set replyto if needed
if(filter_var($fromEmail, FILTER_VALIDATE_EMAIL)) {
$fromName = (strlen($fromName) > 0)?$fromName:'';
$fromName = (strlen($fromName) > 0)?$fromName:$fromEmail;
$mail->addReplyTo($fromEmail, $fromName);
}