more filters and testmail in MailtemplateDispatch
This commit is contained in:
@@ -118,7 +118,19 @@ class MailtemplateDispatchController extends mfBaseController {
|
||||
if($r->filter_order_open) {
|
||||
$filter["order_open"] = true;
|
||||
}
|
||||
if($r->filter_order_int_products) {
|
||||
$filter["order_int_products"] = true;
|
||||
}
|
||||
if($r->filter_billingaddress) {
|
||||
$filter["billingaddress"] = true;
|
||||
}
|
||||
if($r->filter_techcontact) {
|
||||
$filter["techcontact"] = true;
|
||||
}
|
||||
|
||||
if($r->filter_zip_source) {
|
||||
$filter["zip_source"] = $r->filter_zip_source;
|
||||
}
|
||||
if($r->filter_zip) {
|
||||
foreach(preg_split("/[, ]+/", $r->filter_zip) as $zip) {
|
||||
$filter["zip"][] = trim($zip);
|
||||
@@ -142,6 +154,18 @@ class MailtemplateDispatchController extends mfBaseController {
|
||||
return $this->addAction();
|
||||
}
|
||||
|
||||
$dispatch->recipient_count = count($dispatch->getRecipients());
|
||||
$dispatch->save();
|
||||
|
||||
|
||||
if($r->send_testmail && $r->testmail_to) {
|
||||
$dispatch->sendToRecipients($r->testmail_to);
|
||||
|
||||
$this->layout()->setFlash("Test Email erfolgreich versendet", "success");
|
||||
$this->redirect("MailtemplateDispatch", "edit", ['id' => $dispatch->id]);
|
||||
}
|
||||
|
||||
|
||||
$this->layout()->setFlash("Emailversand erfolgreich gespeichert", "success");
|
||||
$this->redirect("MailtemplateDispatch");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user