Commit bcb3d416 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Dont send preview emails

parent 5234a654
......@@ -389,16 +389,21 @@ class MailTemplateService {
$this->mailMessage->send();
$dateTime = new DateTime();
$currentTimestamp = $dateTime->getTimestamp();
$this->addMailToMailQueue(
$this->extensionKey, $this->templateName, $subject, $emailBody, $this->priority,
$currentTimestamp, TRUE, $currentTimestamp, $this->language, $siteRootId
);
if (!$isPreview) {
$this->addMailToMailQueue(
$this->extensionKey, $this->templateName, $subject, $emailBody, $this->priority,
$currentTimestamp, TRUE, $currentTimestamp, $this->language, $siteRootId
);
}
} else {
$this->addMailToMailQueue(
$this->extensionKey, $this->templateName, $subject, $emailBody, $this->priority, 0, FALSE, 0,
$this->language, $siteRootId
);
if (!$isPreview) {
$this->addMailToMailQueue(
$this->extensionKey, $this->templateName, $subject, $emailBody, $this->priority, 0, FALSE, 0,
$this->language, $siteRootId
);
}
}
return TRUE;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment