Notification email details

I couldn't figure out how to configure the Notification module to send out better subject headings, so I changed the module code. The file to change is in modules/notify/notify.module .

Here is the diff:


*** 427,433 ****
// Set up initial values for e-mail.
$from = variable_get('site_mail', ini_get('sendmail_from'));
$from_name = variable_get('site_name', 'Drupal');
! $subject = t('@sitename new content notification for @username', array('@username' => $user->name, '@sitename' => variable_get('site_name', 'Drupal')));

$body = t('Greetings @user,', array('@user' => $user->name)) ."\n\n". $body;

--- 427,435 ----
// Set up initial values for e-mail.
$from = variable_get('site_mail', ini_get('sendmail_from'));
$from_name = variable_get('site_name', 'Drupal');
!
! # This breaks internationalization (because the prompt changed)
! $subject = t('@sitename new content notification: @notifydate', array('@notifydate' => date("Y-m-d H:i"), '@sitename' => variable_get('site_name', 'Drupal')));

$body = t('Greetings @user,', array('@user' => $user->name)) ."\n\n". $body;

Note that in addition to adding the date I removed the username from the subject. Also note that this will break when the notify module is changed (perhaps with the next Drupal upgrade).

Syndicate content Syndicate content