I only use the "Drupal mail" Send method, using the "Messaging plain text" Message body filter. The Header and Footer are defined in the Notifications event Message template, while the Subject and Content are defined in the Notifications for node creation, Notifications for node updates and Notifications for node comments Message templates.

The sent plain text mail contains no newlines at all, so it looks ugly and is hard to read. There is even no newline between Header and Content.

This bug occurs with the 6.x-2.2 versions of Messaging and Notifications, as well as with the latest 6.x-3.x branch from CVS.

Comments

roball’s picture

Title: "Drupal mail" method strips all newlines from Plain Text notification messages » "Messaging plain text" input format strips all newlines from Plain Text notification messages
Category: bug » support
Status: Active » Fixed

OK, problem is now fixed. It has been caused by the "HTML to text" filter which has been enabled on the "Messaging plain text" input format used by the "Drupal mail" send method. Solution is to ensure that filter is NOT enabled on that input type.

mikemccaffrey’s picture

Status: Fixed » Active

Removing the "HTML to text" filter may keep newlines from being deleted, but it also keeps unwanted html code from being deleted. If you are doing notifications of web content, it seems important to strip out all the tags before sending.

Is there a way to get the newlines to stay (especially in the message templates) without disabling this filter?

roball’s picture

I will never have HTML code in the notification mails since I never use the tokens [node-teaser] or [node-body]. Using them is a bad idea anyway, IMO, since the notification should not keep the users offroad but should animate them to login to the website instead.

roball’s picture

Category: support » bug

By default, the "Messaging plain text" input format has both the "HTML to text" and "Line break converter" filters enabled. However, they both need to be disabled in order to send correctly formatted plain-text messages!

westbywest’s picture

Subscribing

schlibling’s picture

Hi,

I have a similar problem.
I installed first Drupal 6.14 few months ago and update it to 6.15 reacently.
(it's just for learning for the time being - by far not at the stage of production)

And from the beginning (6.14), whether a user registers or ask for new password or anything else,
newlines are stripped from the notification emails.
And the same applies for the submission notifications of the module Webform.

After reading this post I disabled both "HTML filter" and "Line break converter" in "Administer>Site configuration>Input formats"
but it did not help.

Any help?

davidteall’s picture

Subscribe.

I am still using D5 but the problem is the same. It is one of the most annoying problems with Notifications which otherwise work well. It makes the output from the site look so unprofessional but try as I might I cannot find a way to fix it.

jose reyero’s picture

Status: Active » Closed (won't fix)

I think all the filters work as expected, they're not easy to set up though. Some help here, http://drupal.org/node/252619

The order of the filters is critical, but that is the same for Drupal Input filters too.

There won't be changes for this version, which will break backwards compatibility for people who already got them working, but there's a much better (and easier) filtering system for the 4.x branch.