Skip Menu |

This queue is for tickets about the Email-Send-SMTP-TLS CPAN distribution.

Report information
The Basics
Id: 62908
Status: resolved
Priority: 0/
Queue: Email-Send-SMTP-TLS

People
Owner: fayland [...] cpan.org
Requestors: aaron [...] suran.com
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 0.03
Fixed in: (no value)



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 $@;
From: aaron [...] suran.com
Here is the sample corrupted email.
Subject: corrupted email.txt

Message body is not shown because it is too large.

From: aaron [...] suran.com
Actually, the bug is in Net::SMTP::TLS, and the fix for it can be found here: https://rt.cpan.org/Public/Bug/Display.html?id=33031
you're right. I know the issue for some days and a workaround with that module (without change it) is something like my @parts = unpack("(A1000)*", $msg->as_string); $smtp->datasend($_) foreach @parts; but since the maintainer of Net::SMTP::TLS is no longer reached I guess I may kickout a Net::SMTP::TLS::ButMaintained, what do you think? Thanks
Subject: Re: [rt.cpan.org #62908] Large emails corrupted text
Date: Thu, 11 Nov 2010 06:21:21 -0800
To: bug-Email-Send-SMTP-TLS [...] rt.cpan.org
From: Aaron Kangas <aaron [...] cdmplus.com>
It would help a number of people to have a working version of Net::SMTP::TLS. On Nov 10, 2010, at 4:48 PM, Fayland Lin via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=62908 > > > you're right. I know the issue for some days and a workaround with that > module (without change it) is something like > > my @parts = unpack("(A1000)*", $msg->as_string); > $smtp->datasend($_) foreach @parts; > > but since the maintainer of Net::SMTP::TLS is no longer reached I guess I > may kickout a Net::SMTP::TLS::ButMaintained, what do you think? > > Thanks >
fixed by using a forked version of TLS