function mail_logger_mail_alter in Mail Logger 5
Same name and namespace in other branches
- 6 mail_logger.module \mail_logger_mail_alter()
- 7 mail_logger.module \mail_logger_mail_alter()
implementation of hook_mail_alter
Purpose of this function is to log all outgoing mail
File
- ./
mail_logger.module, line 67
Code
function mail_logger_mail_alter(&$mailkey, &$to, &$subject, &$body, &$from, &$headers = '') {
$args = array(
$mailkey,
$to,
$subject,
$body,
$from,
serialize($headers),
time(),
);
db_query("INSERT INTO {mail_logger} (\n `mlid` , `mailkey` , `to` , `subject` , `body` , `from` , `headers`, `date_sent`\n ) VALUES ( \n NULL, '%s', '%s', '%s', '%s', '%s', '%s', %d )", $args);
}