diff --git a/Layout/default/Preordernotification/Form.php b/Layout/default/Preordernotification/Form.php index b36192766..5623e3046 100644 --- a/Layout/default/Preordernotification/Form.php +++ b/Layout/default/Preordernotification/Form.php @@ -31,7 +31,34 @@ -

Empfänger

+ +

Absender

+ +
+ +
+ + Wird beim Empfänger als Absender angezeigt +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +

Empfänger

Die Aussendung wird an die Kontaktemailadresse aller Bestellungen versendet. Wählen Sie folgende Konditionen aus, um die Empfänger zu beschränken:

diff --git a/application/Preordernotification/Preordernotification.php b/application/Preordernotification/Preordernotification.php index a25e95a88..9ee38b6d2 100644 --- a/application/Preordernotification/Preordernotification.php +++ b/application/Preordernotification/Preordernotification.php @@ -15,8 +15,12 @@ class Preordernotification extends mfBaseModel { public function sendToPreorder(Preorder $preorder, $email_to) { $subject = $this->subject; $body = $this->body_html; // TODO: Variable replacement - $from = "office@xinon.at"; - $from_name = "XINON Kundenservice"; + $from = $this->sender_email; + $from_name = $this->sender_name; + $reply_to = null; + if($this->sender_replyto) { + $reply_to = $this->sender_replyto; + } $to = $preorder->email; if($email_to) { @@ -46,7 +50,10 @@ class Preordernotification extends mfBaseModel { $email->setHtmlBody($body); $email->setFrom($from, $from_name); $email->setTo($to); - $email->setHeader("X-".MFAPPNAME."-Pnid", $this->id); + if($reply_to) { + $email->setHeader("Reply-To", $reply_to); + } + $email->setHeader("X-".ucfirst(MFAPPNAME)."-Pnid", $this->id); if(count($attachments)) { foreach($attachments as $file) { $email->addAttachment($file["path"], null, $file["filename"], $file['mimetype']); diff --git a/application/Preordernotification/PreordernotificationController.php b/application/Preordernotification/PreordernotificationController.php index e8fce8179..5dd50746c 100644 --- a/application/Preordernotification/PreordernotificationController.php +++ b/application/Preordernotification/PreordernotificationController.php @@ -234,6 +234,9 @@ class PreordernotificationController extends mfBaseController { //var_dump($filter); $data = []; $data['preordercampaign_id'] = $campaign_id; + $data['sender_email'] = $r->sender_email; + $data['sender_name'] = $r->sender_name; + $data['sender_replyto'] = $r->sender_replyto; $data['subject'] = $r->subject; $data['body_html'] = $r->body_html; $data['note'] = $r->note; @@ -371,7 +374,7 @@ class PreordernotificationController extends mfBaseController { $this->redirect("Preordernotification", "edit", ['id' => $new_id]); } $notification->sendToPreorder($preorder, $r->testmail_to); - $this->layout()->setFlash("Testmail versendet", "success"); + $this->layout()->setFlash("Test Email erfolgreich versendet", "success"); $this->redirect("Preordernotification", "edit", ['id' => $new_id]); }