Created
July 8, 2015 15:02
-
-
Save jbickar/dad74f7578c003fb9239 to your computer and use it in GitHub Desktop.
hook_mail_alter() implementation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_mail_alter(). | |
*/ | |
function mymodule_mail_alter(&$message) { | |
if (($message['id'] == 'contact_page_mail') || ($message['id'] == 'contact_user_mail')) { | |
$message['headers']['Reply-To'] = $message['from']; | |
$message['body'][2] = $message['body'][1]; | |
$message['body'][1] = 'Reply to this message using: '.$message['from']; | |
$message['from'] = 'noreply@example.com'; | |
$message['headers']['From'] = $message['from']; | |
$message['params']['mail'] = $message['from']; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment