Active
Project:
tellafriend
Version:
6.x-2.8
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Nov 2007 at 19:46 UTC
Updated:
7 Jan 2010 at 14:53 UTC
At the code line:
$body .= "\nPersonal Message: " . $form_values['tellafriend_personal'] . "\n----------------------\n\n";
the \n new line chars do not work, as the sent email looks like this:
...Any word on your door handle parts? ---------------------- You are invited to check out...
should be:
...Any word on your door handle parts?
----------------------
You are invited to check out...
Comments
Comment #1
garryp commentedComment #2
joostvdl commentedStill a bug?
Comment #3
tahani commentedI "fixed" this by changing the \n newlines to html line breaks (br). Not sure why the \n's don't work here but do in other places (webforms), but there you are. Hope this helps someone...
--Tahani
Comment #4
elfcurry commentedStill a bug I'd say. Message formatting is ignored and nothing starts on a new line. Are newlines stripped out of the text?
Does anyone have a fix? Is there a setting or a patch?
I can't use it at present as it gives a poor impression.
Comment #5
Lars Pohlmann commentedIt's a Drupal Bug. Drupal uses the mimeheader "format=flowed" but many mailclients don't support this.
A quickfix is to insert
$body = str_replace( "\n" , "<br />" , $body );in Line 446 (tellafriend.module), but this will transform the Mail from a text-mail to a html-mail.
I issued a drupal bug report:
http://drupal.org/node/636230
Comment #6
sir.eduha commentedI fix it by removing line 501 in tellafriend.module
this line:
$message['headers']['Content-Type'] = 'text/html; charset=utf-8';
Line breaks saved in mail body, and it displayed while Content-Type is set to "text/plain" (by default)