init
This commit is contained in:
commit
8e2eea551b
3 changed files with 13 additions and 0 deletions
0
README.md
Normal file
0
README.md
Normal file
3
altermail.info
Normal file
3
altermail.info
Normal 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
10
altermail.module
Normal 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() . '>');
|
||||
}
|
||||
|
||||
?>
|
Loading…
Reference in a new issue