isSMTP(); $phpmailer->Host = $smtp_host; $phpmailer->Port = $smtp_port; $phpmailer->SMTPAuth = true; $phpmailer->Username = $smtp_username; $phpmailer->Password = $smtp_password; $sender = get_option('kompass_smtp_sender', null); $sender_name = get_option('kompass_smtp_sender-name', null); if (null !== $sender && null !== $sender_name) $phpmailer->setFrom( $sender, $sender_name ); #$phpmailer->SMTPSecure = $smtp_secure; } ); } } public static function settings_form() { if (isset($_POST['save'])) { update_option('kompass_use_smtp', false); if (isset($_POST['use_smtp'])) update_option('kompass_use_smtp', true); update_option('kompass_smtp_host', sanitize_text_field(wp_unslash($_POST['smtp-host']))); update_option('kompass_smtp_port', sanitize_text_field(wp_unslash($_POST['smtp-port']))); update_option('kompass_smtp_user', sanitize_text_field(wp_unslash($_POST['smtp-user']))); update_option('kompass_smtp_pass', sanitize_text_field(wp_unslash($_POST['smtp-pass']))); update_option('kompass_smtp_sender', sanitize_text_field(wp_unslash($_POST['smtp-sender']))); update_option('kompass_smtp_sender-name', sanitize_text_field(wp_unslash($_POST['smtp-sender-name']))); kompass_print_message_box('Die Einstellungen wurden gespeichert.'); } require BDP_LV_PLUGIN_DIR . '/settings/views/mail-settings.php'; } }