CharSet = 'UTF-8'; $mail->setFrom(EMAIL_FROM, EMAIL_NAME); $mail->addReplyTo(EMAIL_REPLY, EMAIL_NAME); $mail->addAddress(EMAIL_TO); $mail->Subject = EMAIL_SUBJECT; $email_body = __emailBody("tibet"); $mail->IsHTML(true); $mail->AddEmbeddedImage('images/logo.png', 'logoTibet'); $mail->msgHTML($email_body, __DIR__); $mail->AltBody = strip_tags($email_body); $mail->send(); } catch (Exception $e) { } if($_REQUEST['spendenart'] == "einmalig") { $mail = new PHPMailer\PHPMailer\PHPMailer(true); try { $mail->CharSet = 'UTF-8'; $mail->setFrom(EMAIL_FROM, EMAIL_NAME); $mail->addReplyTo(EMAIL_REPLY, EMAIL_NAME); $mail->addAddress($_REQUEST['email']); $mail->Subject = EMAIL_SUBJECT; if($_REQUEST['zahlungsart'] == "SEPA") { $email_body = __emailBody("einmalig-sepa"); } else { $email_body = __emailBody("einmalig"); } $mail->IsHTML(true); $mail->AddEmbeddedImage('images/logo.png', 'logoTibet'); $mail->msgHTML($email_body, __DIR__); $mail->AltBody = strip_tags($email_body); $mail->send(); } catch (Exception $e) { } } header("Location: " . $url . "?code=x999&spendenart=". $_REQUEST['spendenart']); break; case "x999" : require("templates/header.php"); if($_REQUEST['spendenart'] == "einmalig") { require("templates/danke-einmalig.php"); } else { require("templates/danke-regelmaessig.php"); } require("templates/footer.php"); break; default: require("templates/header.php"); require("templates/formular.php"); require("templates/footer.php"); } ?>