protected function update()
{
$this->getDao()->update();
if (!is_dir(PIMCORE_LOG_MAIL_PERMANENT)) {
File::mkdir(PIMCORE_LOG_MAIL_PERMANENT);
}
if ($html = $this->getBodyHtml()) {
if (File::put(PIMCORE_LOG_MAIL_PERMANENT . '/email-' . $this->getId() . '-html.log', $html) === false) {
Logger::warn('Could not write html email log file. LogId: ' . $this->getId());
}
}
if ($text = $this->getBodyText()) {
if (File::put(PIMCORE_LOG_MAIL_PERMANENT . '/email-' . $this->getId() . '-text.log', $text) === false) {
Logger::warn('Could not write text email log file. LogId: ' . $this->getId());
}
}
}