SiT! Bugs

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001319SiT!outbound emailpublic2010-05-06 10:002010-05-06 10:07
Reporterjko 
Assigned To 
PrioritynormalSeveritymajorReproducibilityN/A
StatusnewResolutionopen 
PlatformWindowsOSWindowsOS VersionXP+Later
Product Version3.60 LTS 
Target VersionFixed in Version 
Summary0001319: error when using gen_mail() in Mime_mail manually
DescriptionI created a class which extends Mime_mail (to be able to use PEAR::mail without too much hassle), but it might be an issue with Mime_mail itself (not sure though) because Mime_mail->send_mail uses explode() with CRLF.CRLF-delimiter too.

If you call Mime_mail and pass the to, from, subject and body to the constructor gen_mail() will generate something like this (CRLF is a placeholder):

From: From-emailCRLF
BodyGoesHere

The result of this is:

send_mail() can't split header and body as intented, because it doesn't find CRLFCRLF at the appropriate position. This results in weird emails.

I fixed this by adding

$email .= (empty($email)) ? CRLF.CRLF : CRLF;

in gen_mail() just before the line containing

$email .= $this->build_message();

*Should* not result in any unwanted side effects (because $email is set to "empty" right on top) but no guarantee. :)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0003149)
jko (reporter)
2010-05-06 10:07

Ah sorry, didn't notice the way you guys handle the body ($mime->attach($body...)). If you use this my fix will mess up the email by itself and your way works.

Still, the report issues seems to be a bug, but my "fix" isn't a solution atm.

- Issue History
Date Modified Username Field Change
2010-05-06 10:00 jko New Issue
2010-05-06 10:07 jko Note Added: 0003149


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker