When you use tokenized mail the line breaks are not processed in the mail. After some search on similar problems in other cases I changed the module token_actions.module

line 139 : $params['body'] = drupal_html_to_text(token_replace_multiple($context['message'], $context));
to $params['body'] = token_replace_multiple($context['message'], $context);

and after that the linebreaks were ok.

I know this is not the appropriate way to solve this, but for me it was the only way now

Comments

jwarner’s picture

Subscribing

jwarner’s picture

Another option is to use some html markup in your email. Drupal will then convert, for example, a <br> tag into a line break in the email.

See the documentation:

http://api.drupal.org/api/function/drupal_html_to_text/6

Specifically,

This function provides suitable alternatives for the following tags: <a> <em> <i> <strong> <b> <br> <p> <blockquote> <ul> <ol> <li> <dl> <dt> <dd> <h1> <h2> <h3> <h4> <h5> <h6> <hr>
squarecandy’s picture

Some strange behaviors with html_to_text for these emails...

Two line breaks (<br><br>) doesn't seem to work - makes just one line break. Using <p> works better...

Also creating hyperlinks creates a strange "footnote" sort of formatting. Any advice?

Thanks!

Jim Kalmbach’s picture

I tried all of these solutions with no luck and eventually gave up. In my case, all my users really needed was the url so I put just [comment:url] in the body of the email nothing else and it worked.