
luckypower
New User
Oct 23, 2008, 2:14 AM
Post #1 of 2
(782 views)
|
|
mail size increase
|
Can't Post
|
|
i want to reconstruct mail form mime mail.put it in to imap server using Mail::IMAPClient module. every thing works fine. but when i append the mail in IMAP server using Mail::IMAPClient's append_string method, the size of the mail increases. my code is something like this
$mimeent = generatemail(); # this func return mime entity. print "length before: " . length($mimeent->as_string); my $newid =$imap->append_string($folder, $mimeent->as_string, $flags, $date); print "length after: " .$imap->size($newid); the o/p is: length before: 337119 length after: 342662 According to documentation of append_sting method: Note that many servers will get really ticked off if you try to append a message that contains "bare newlines", which is the titillating term given to newlines that are not preceded by a carrage return. To protect against this, append_string will insert a carrage return before any newline that is "bare". If you don't like this behavior then you can avoid it by not passing naked newlines to append_string. I checkd that the data contain the CRLF. so i am not getting why the size of mail increse ..?? any hint ..?? thanks
|