Basic implementation event signup

This commit is contained in:
2024-05-27 16:59:30 +02:00
parent a66f2d2422
commit a69d83bc0a
321 changed files with 138376 additions and 644 deletions

View File

@ -35,45 +35,8 @@ class MailController
if (isset($_REQUEST['action'])) {
switch ($_REQUEST['action']) {
case 'send-email':
// SMTP-Konfiguration
$smtp_host = 'bdp.mein-verein.online'; // SMTP-Host
$smtp_port = 25; // SMTP-Port
$smtp_username = 'noreply@mareike.sachsen.pfadfinden.de'; // SMTP-Benutzername
$smtp_password = 'fwJ_wxbW9G45'; // SMTP-Passwort
$smtp_secure = 'tls'; // Verschlüsselung (tls oder ssl)
// Einstellungen für wp_mail ändern
add_action( 'phpmailer_init', function( $phpmailer ) use ( $smtp_host, $smtp_port, $smtp_username, $smtp_password, $smtp_secure ) {
$phpmailer->isSMTP();
$phpmailer->Host = $smtp_host;
$phpmailer->Port = $smtp_port;
$phpmailer->SMTPAuth = true;
$phpmailer->Username = $smtp_username;
$phpmailer->Password = $smtp_password;
$phpmailer->setFrom('info@pfadfinden-halle.de', 'Pfadfinden - Halle');
#$phpmailer->SMTPSecure = $smtp_secure;
} );
// Senden Sie die E-Mail
$sent = wp_mail($_REQUEST['mail-to'],$_REQUEST['mail-subject'],$_REQUEST['mail-text'],
['Reply-To: ' . $_REQUEST['mail-from'], 'Content-Type: text/html; charset=UTF-8']);
// Überprüfen, ob die E-Mail erfolgreich gesendet wurde
if ( $sent ) {
echo '<p>E-Mail wurde erfolgreich gesendet!</p>';
} else {
echo '<p>Fehler beim Senden der E-Mail!</p>';
}
echo $_REQUEST['mail-to'] . '<br />';
echo $_REQUEST['mail-text'];
echo 'mail gesendet';
new Sendmail();
new MailCompose();
break;
case 'create_group_form':