function contact_attach_mail_alter in Contact Attach 7
Implements hook_mail_alter().
File
- ./
contact_attach.module, line 300 - Allows attaching files to messages sent using contact forms.
Code
function contact_attach_mail_alter(&$message) {
if (isset($message['params']['attachments_allowed'])) {
switch ($message['id']) {
case 'contact_page_mail':
case 'contact_page_copy':
case 'contact_user_mail':
case 'contact_user_copy':
$return_message = _contact_attach_process_attachments($message);
if (!empty($return_message)) {
$message['headers'] = $return_message['headers'];
$message['body'] = $return_message['body'];
}
break;
}
}
}