Posted on 2005-03-28 22:14:50-08 by gwade
Mime Type Lost when Recipient List is Long
After we moved to Exchange 2000, messages being sent using Mail::Sender began to have problems with long recipient lists. If the "TO:" header and the list of recipients exceeds 1024 bytes, the header is corrupted. The message is delivered, but the mime type is ignored. For example, the mime type will be HTML, but the message will be delivered in plain text (tags showing, etc.). The engineer says that the Exchange 2000 server strictly complies to RFC 821, whereas the previous version was more "forgiving". Have you heard of this behavior before, and if so, any ideas on a fix? Thanks.
Direct Responses: 275 | Write a response
Posted on 2005-03-29 12:31:44-08 by jenda in response to 267
Re: Mime Type Lost when Recipient List is Long

I think I know the reason and have it fixed.

Please try to add if (length($str)+length($hdr) > 997) { # header too long, max 1000 chars $str =~ s/(.{1,997}[;,])\s+/$1\x0D\x0A\t/g; } into the sub print_hdr() above the print $s "$hdr: $str\x0D\x0A"; line. (should be around line 182)

Let me know if this helps. I will release the fixed version to CPAN afterwards.

Jenda
Direct Responses: 833 | Write a response
Posted on 2005-08-04 12:25:29-07 by matthias in response to 275
Re: Mime Type Lost when Recipient List is Long
it fixed a similar problem for me. (some headers where moved into the body) Matthias
Direct Responses: Write a response
Perl Weekly newsletter
A free weekly newsletter for people who are busy to read all the blogs. click here to check it out.