This commit is contained in:
phil 2016-07-22 21:40:19 +02:00
commit 8e2eea551b
3 changed files with 13 additions and 0 deletions

0
README.md Normal file
View file

3
altermail.info Normal file
View file

@ -0,0 +1,3 @@
name = altermail
description = Alter E-Mail-Headers (e.g. Add Message-ID)
core = 7.x

10
altermail.module Normal file
View file

@ -0,0 +1,10 @@
<?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() . '>');
}
?>