Added newline after html body in Preordernotification Email
This commit is contained in:
@@ -20,8 +20,11 @@ class Preordernotification extends mfBaseModel {
|
||||
|
||||
public function sendToPreorder(Preorder $preorder, $email_to = false) {
|
||||
$subject = $this->subject;
|
||||
$body = $this->replaceBodyVariables($this->body_html, $preorder); // TODO: Variable replacement
|
||||
|
||||
$body = "<html><head></head><body>";
|
||||
$body .= $this->replaceBodyVariables($this->body_html, $preorder); // TODO: Variable replacement
|
||||
$body .= "</body></html>";
|
||||
$body .= "\n"; // explicitlyadd new line, or some mail clients wont show attachment
|
||||
|
||||
// TODO: Extract text part
|
||||
|
||||
//var_dump($body);exit;
|
||||
|
||||
@@ -441,10 +441,22 @@ class PreordernotificationController extends mfBaseController {
|
||||
|
||||
if($r->send_testmail && $r->testmail_to) {
|
||||
$preorder = PreorderModel::getFirstActive($preorder_filter);
|
||||
|
||||
if($this->attach_borderpoint) {
|
||||
$i = 1;
|
||||
while(!$preorder->adb_hausnummer->gps_lat && !$preorder->adb_hausnummer->gps_long) {
|
||||
$this->log->debug(__METHOD__.": round $i");
|
||||
$preorder = PreorderModel::searchActive($preorder_filter, ["start" => $i, "count" => 1]);
|
||||
if(!$preorder) break;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
|
||||
if(!$preorder) {
|
||||
$this->layout()->setFlash("Testmail konnte nicht versendet werden. Keine Empfänger gefunden", "warn");
|
||||
$this->redirect("Preordernotification", "edit", ['id' => $new_id]);
|
||||
}
|
||||
|
||||
$notification->sendToPreorder($preorder, $r->testmail_to);
|
||||
$this->layout()->setFlash("Test Email erfolgreich versendet", "success");
|
||||
$this->redirect("Preordernotification", "edit", ['id' => $new_id]);
|
||||
|
||||
Reference in New Issue
Block a user