Last active
December 24, 2015 09:39
-
-
Save alancoleman/6779129 to your computer and use it in GitHub Desktop.
Send a simple mail from Drupal 6 using drupal_mail hook
This file contains hidden or 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
<?php | |
drupal_mail( 'control_centre_feed', 'feed', '[email protected]', language_default(), $params, '[email protected]'); | |
function control_centre_feed_mail ($key, &$message, $params) { | |
switch ($key) { | |
case 'feed': | |
$message['subject'] = t($params['filename']); | |
$message['body'][] = t($params['filepath']); | |
break; | |
} | |
drupal_set_message( $params['filename'] ); | |
drupal_set_message( 'Email sent to:' . $message['to'] . '' ); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment