drupal-module-alter-mail/altermail.module

11 lines
397 B
Text
Raw Permalink Normal View History

2016-07-22 21:40:19 +02:00
<?php
// Adds a random message-ID to mail header
function altermail_mail_alter(&$message) {
// $message['headers']['Message-ID'] = ('<' . time() .'-' . md5($sender . $recipient) . '@' . gethostname() . '>');
$message['headers']['Message-ID'] = ('<' . base_convert(microtime(), 10, 36) . '-' . base_convert(bin2hex(openssl_random_pseudo_bytes(8)), 16, 36) . '@' . gethostname() . '>');
}
?>