public function DevelMailLog::mail in Devel 7
Save a mail message to a file using Drupal variables and default settings.
Parameters
$message: A message array, as described in hook_mail_alter().
Return value
TRUE if the mail was successfully accepted, otherwise FALSE.
Overrides DefaultMailSystem::mail
See also
http://php.net/manual/en/function.mail.php
File
- ./
devel.mail.inc, line 94 - MailSystemInterface for logging mails to the filesystem.
Class
- DevelMailLog
- Logs mail messages to the filesystem.
Code
public function mail(array $message) {
$output = $this
->composeMessage($message);
$output_file = $this
->getFileName($message);
return file_put_contents($output_file, $output);
}