Logging emails in drupal 6
Ever tried to log all your email?
People come up with the craziest ideas to log email but luckely in drupal there is a nice way to log your emails to a file in your system.
I'm currently using it only for debugging but here it goes!
ps: Don't forget to replace your_module_name with, well yeah, your module name!
Requirement : Devel module
Location of log file : /tmp/drupal_debug.txt
/**
* Implementation of hook_mail_alter().
*
* @param $message A structured array containing the message to be altered. keys in this array include: id, to, subject, body, from, headers
*/
function your_module_name_mail_alter(&$message) {
dd($message);
}
More like this
- Nick_vh: Easy mail logging #drupal http://bit.ly/1Nx7GH
- Nick_vh: RT @DrupalJam: Gezocht: cameraman/-vrouw om de sessies te filmen! Denk jij de geschikte kandidaat te zijn? Stuur een e-mail via http://d...
- Review of Drupal 7- Multi-sites Drupal Book
- A Slow Query log script for Tomcat Access logs
- My first Commited Drupal Module: Apachesolr Ubercart
