For some reason an errant dash is being added to all notification e-mails and I am unable to get rid of it. I have cleared all notification templates and put custom test insto them, but still I am left with a dash before every digested entry. Here is an example: http://s.twb.org/eYi7Zb

Anyone have a tip on how I could get rid of this dash? It happens in both HTML and Plain text e-mails.

thanks,

-b

Comments

LaurentGoderre’s picture

We have the same problem!

LaurentGoderre’s picture

I dissected the code and I couldn't find where it is from but I suspect it might actually be created by the mail module. Are you using PHPMailer?

FrancoisL’s picture

Hello,

I had the same problem with my emails.
I just found the solution today to resolve this. After checking files in notification modules. I checked messaging module and found in "messaging_mail.module":

function messaging_mail_messaging($op, $type = NULL) {
  switch($op) {
    case 'send methods':
      $info['mail'] = array(
        'title' => 'Drupal mail',
        'name' => t('Mail'), // Name for display
        'group' => 'mail', // Class of sending method
        'destination' => 'mail', // Account property to use as destination
        'type' => MESSAGING_TYPE_SEND,  // Method type: push || pull
        'glue' => "\n", // Glue for message body lines
        'footer' => "\n--",  // Separator for message footer
        'description' => t('Send e-mails using the default Drupal mail library.'),
        'send callback' => 'messaging_mail_send_msg', // Sending callback
        'system accounts' => TRUE, // Supports multiple sending accounts
        'account type' => 'mail', // The type of system account to use
      );
      return $info;  
  }
}

I removed the two hyphens in this line:
'footer' => "\n--", // Separator for message footer

and it worked just for footer hyphens.

There is the same line in « messaging_mime_mail.module » and « messaging_phpmailer.module ». if the first correction dosen't work try one or both of this files too but this was not necessary for me.

I think that the solution is no more in Notifications module but in messaging.

François

chipway’s picture

This issue is quite uncredible.

You can fix it only by replacing theme function on line 978 in notifications.cron.inc
function theme_notifications_digest_short_line($line, $group) {
return '- ' . $line;
}
by
function theme_notifications_digest_short_line($line, $group) {
return $line;
}
This line introduce some design choice in the code (add a dash !). This choice should be left to designer at CSS or theme level.

I tried to change it by overriding theme (phptemplate_notifications_digest_short_line, then mytheme_notifications_digest_short_line
by it wasn't taken into account.
Tried lot of things to do it run (phptemplate_, mytheme_, deleting theme registry), but only the patch makes it run.

chipway’s picture

Here is the patch for comment #4.

Please check it and apply.

chipway’s picture

Status: Active » Needs review
anandinalla’s picture

no coment

silvadalula’s picture

Hello.

Can you send me the patch? the link don't go.

Thanks.

chipway’s picture

Here is the patch for comment #4, as is.
Could you re-roll and test it?
Let me know if it is useful.

chipway’s picture

srees’s picture

Issue summary: View changes

Just ran across this myself. Very confused why the template theme overrides refuse to work. Wondering if perhaps during cron all the theming hooks may not get run?

Haha...never thought about cron using the admin theme instead of the primary drupal theme. Added overrides to the admin theme and voila!