Commit 5b489aaa authored by Carsten Brandt's avatar Carsten Brandt

let base mailer store files as .eml instead of .txt

allows opening email for view in mail program directly
parent 016d796e
...@@ -281,7 +281,7 @@ abstract class BaseMailer extends Component implements MailerInterface, ViewCont ...@@ -281,7 +281,7 @@ abstract class BaseMailer extends Component implements MailerInterface, ViewCont
$file = $path . '/' . call_user_func($this->fileTransportCallback, $this, $message); $file = $path . '/' . call_user_func($this->fileTransportCallback, $this, $message);
} else { } else {
$time = microtime(true); $time = microtime(true);
$file = $path . '/' . date('Ymd-His-', $time) . sprintf('%04d', (int)(($time - (int)$time) * 10000)) . '-' . sprintf('%04d', mt_rand(0, 10000)) . '.txt'; $file = $path . '/' . date('Ymd-His-', $time) . sprintf('%04d', (int)(($time - (int)$time) * 10000)) . '-' . sprintf('%04d', mt_rand(0, 10000)) . '.eml';
} }
file_put_contents($file, $message->toString()); file_put_contents($file, $message->toString());
return true; return true;
......
Markdown is supported
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