Subject: | A long list of recipients can confuse mail |
Date: | Tue, 15 Nov 2011 11:37:46 -0500 |
To: | bug-Mail-Sendmail [...] rt.cpan.org |
From: | Leslie Giles <lgiles [...] motorola.com> |
The To: header can be a very long list of addresses - if it is too long,
over around 100 characters, then it can get corrupted. I'm not sure if it
is getting corrupted in our SMTP server, or our gmail system, or maybe
somewhere else, but the fix is to avoid dumping all addresses into one long
list. The fix that I have is...
358,360c359,372
< $mail{$header} =~ s/\s+$//o; # kill possible trailing garbage
< socket_write("$header: $mail{$header}$CRLF")
< || return fail("send $header: error");
---
Show quoted text
> if ($header eq "To") {
> # Motorola Mobility - Lezz Giles - 11/15/2011:
> # Split the To field up into seperate addresses
> # and send them one at a time instead of as a
> # long list on a single line.
> while ($mail{$header} =~ /$address_rx/go) {
> socket_write("$header: $1$CRLF")
> || return fail("send $header: $1: error");
> }
> } else {
> $mail{$header} =~ s/\s+$//o; # kill possible trailing garbage
> socket_write("$header: $mail{$header}$CRLF")
> || return fail("send $header: error");
> }
Leslie Giles