[drupal-devel] [bug] user.module user_mail() removes \r from email body.

peterx drupal-devel at drupal.org
Wed Sep 21 08:53:00 UTC 2005


Issue status update for 
http://drupal.org/node/31821
Post a follow up: 
http://drupal.org/project/comments/add/31821

 Project:      Drupal
 Version:      4.6.3
 Component:    user.module
 Category:     bug reports
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  peterx
 Updated by:   peterx
 Status:       active

There is a line in user.module user_mail() that removes \r from the
email body:
str_replace("\r", '', $message),
To make the email comply with the standards the str_replace should be
removed. Some unix based mail servers will ignore the lack of the \r
while others reject the email as invalid.


If you want to fix the occasional wierd line ending from editors on
different operating systems, the following are useful. The following
fixes text from some editors that forget the \r while maintaining the
\r\n from standards compliant email editors.
str_replace("\r\r\n", "\r\n", str_replace("\n", "\r\n", $message));




peterx




More information about the drupal-devel mailing list