Closed (duplicate)
Project:
Mime Mail
Version:
6.x-1.0-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2009 at 07:26 UTC
Updated:
10 Mar 2010 at 19:23 UTC
When calling
mimemail('xx@xx.de', $mail, $message['subject'], $message['body'], TRUE, array(), $message['body'], array(array('filepath' => '...', 'filemime' => 'application/pdf')), 'accept')
the sent email contains an trailing newline \n character.
As workaround I changed in my installation the line in mimemail_prepare()
$subject = mime_header_encode(drupal_html_to_text($subject));
to
$subject = mime_header_encode(trim(drupal_html_to_text($subject)));
It seems that drupal_html_to_text() adds the trailing newline.
Comments
Comment #1
bjcool commentedDuplicate
Comment #2
new_B commentedThe code with trim() above already appears to be in the alpha1 version; however, I am experiencing the subject newline issue. For long subject lines, a box appears at the cut-off point in Outlook 2007. Has anybody encountered this issue and/or have suggestions on solving it?
Thanks in advance.
Comment #3
new_B commentedSorry, couldn't seem to find the duplicate of this issue so setting it to active.
Comment #4
new_B commentedAfter looking into it further, I realized that trim() only strips out the newline if it is at the end of the subject. In my case, what appears to be a newline appears in the middle.
Comment #5
new_B commentedI found a related post, which seems to solve the issue at http://drupal.org/node/438058#comment-2612180.
Comment #6
sgabe commentedDuplicate of #438058: Remove line feeds in subject