Mailadresse und Absender in DB Parameter gelegt

This commit is contained in:
aschwarz
2023-04-28 14:37:43 +02:00
parent 6bfadff458
commit d644adee31
7 changed files with 60 additions and 65 deletions

View File

@ -9,6 +9,10 @@ use PHPMailer\PHPMailer\Exception;
require '../PHPMailer6/src/Exception.php';
require '../PHPMailer6/src/PHPMailer.php';
require '../PHPMailer6/src/SMTP.php';
$mailjumi = get_parameter(1);
$absender = get_parameter(2);
$mailpwd = get_parameter(3);
$empfaenger = $_POST['empfaenger'];
# $empfaenger = "S-1";
@ -71,7 +75,7 @@ function save_mail($mail)
// # Script um sich $path anzeigen zu lassen:
// $mbox = imap_open("{imap.ionos.de:993/imap/ssl}", "info@ju-and-mi.de", "passwort", OP_HALFOPEN)
// $mbox = imap_open("{imap.ionos.de:993/imap/ssl}", "$mailjumi", "$mailpwd", OP_HALFOPEN)
// or die("can't connect: " . imap_last_error());
// if($mbox){
// echo "connect";
@ -110,8 +114,8 @@ try {
$mail->SMTPDebug = 0;
$mail->Host = 'smtp.ionos.de'; //Set the SMTP server to send through
$mail->SMTPAuth = true; //Enable SMTP authentication
$mail->Username = 'info@ju-and-mi.de'; //SMTP username
$mail->Password = "!S3ge1gP"; //SMTP password
$mail->Username = "$mailjumi"; //SMTP username
$mail->Password = "$mailpwd"; //SMTP password
$mail->Port = 465; //TCP port to connect to; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
@ -121,9 +125,9 @@ try {
//Recipients
//$mail->SetFrom($_POST["userEmail"], $_POST["userName"]);
//$mail->AddReplyTo($_POST["userEmail"], $_POST["userName"]);
$mail->SetFrom("info@ju-and-mi.de", "Info JU & MI");
# $mail->AddAddress("info@ju-and-mi.de", "Info JU & MI");
$mail->AddReplyTo("info@ju-and-mi.de", "Info JU & MI");
$mail->SetFrom("$mailjumi", "$absender");
# $mail->AddAddress("$mailjumi", "$absender");
$mail->AddReplyTo("$mailjumi", "$absender");
//$mail->addCC('cc@example.com');
foreach ($mail_bcc as $empfbcc) {
$mail->addBCC("$empfbcc");