Subject: | Large emails corrupted text |
Run the attached script, changing user and password on the mailer and to/from on the email,
so that you can receive it.
You will get an email that does not count up to 10,000. It will do very strange things,
repeating chunks of the email over and over again. Attached is a sample of the received
email.
This demonstration was produced using straight text in the body, but we see similar
problems using this with attached images or pdf's.
This is on a Mac OS X 10.6, but we receive similar results on multiple windows systems and
other Mac OS versions.
perl version: v5.10.1
uname: Darwin Chrome.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT
2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
Aaron Kangas,
Suran Systems
Subject: | spike.pl |
#!/Library/Suran/perl/bin/perl
use Email::Send;
my $mailer = Email::Send->new( {
mailer => 'SMTP::TLS',
mailer_args => [
Host => 'smtp.gmail.com',
Port => 587,
User => 'username@gmail.com',
Password => 'password',
Hello => 'fayland.org',
]
} );
my $lcContent = "begin ";
for (my $lnCounter = 0; $lnCounter<=10000; $lnCounter++){
$lcContent .= 'ab '.$lnCounter."\n";
}
$lcContent .= ' end';
print $lcContent;
use Email::Simple::Creator; # or other Email::
my $email = Email::Simple->create(
header => [
From => 'username@gmail.com',
To => 'to@mail.com'
Subject => 'spike email',
],
body => $lcContent,
);
eval { $mailer->send($email)};
die "Error sending email: $@" if $@;