Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: giles [...] godartbrown.co.uk
Cc:
AdminCc:

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



Subject: I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Thu, 29 Jan 2015 23:05:51 +0000
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
I have a min repro case that works fine on windows but throws an error when run on Linux and Mac. I believe it is linked to bare line endings. This is the sample code; <code> use strict; use warnings; use Email::Send::SMTP::Gmail; my $username = ‘user@gmail.com'; my $password = ‘password'; my $to = ‘recipient@somewher.com'; my $from = 'user@gmail.com'; my $subject = 'Test'; my $attachment = “/pathtoapdffile/indata.pdf"; my $thisLetter = "hello world <br> line 2"; my $mail = Email::Send::SMTP::Gmail->new( -smtp => 'smtp.gmail.com', -login => ‘user@gmail.com', -pass => ‘password', -layer => 'ssl', -port => 465, # -debug => 1, ); $mail->send( -to => $to, -subject => $subject, # -verbose => '1', -contenttype=>'text/html', -body => $thisLetter . '<br><br>', -attachments => $attachment ); $mail->bye; </code> gives the following error on linux and Mac; … Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command channel: at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. at the end of the pdf file. I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to date (0.88). Have I missed anything? Thanks Giles
Hello, Thanks for this bug-report. I see that for some reason Google decided to change/adjust its SMTP server. Your sample code works on my Linux machine connecting to servers other than Gmail, but as you said, fails with it. The issue seems to be related on how the attachment is processed. I've changed the code so instead of sending the whole attachment file to the server, it sends it in several chunks. Based on my tests, now it works!, so please: Could you download the latest version from CPAN (I'm uploading 0.94) to give it a try? I really don't know why it works or not in Windows. Could you try the new release also in Windows? Hope this helps. On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote: Show quoted text
> I have a min repro case that works fine on windows but throws an error > when run on Linux and Mac. I believe it is linked to bare line > endings. > > This is the sample code; > <code> > use strict; > use warnings; > use Email::Send::SMTP::Gmail; > my $username = ‘user@gmail.com'; > my $password = ‘password'; > my $to = ‘recipient@somewher.com'; > my $from = 'user@gmail.com'; > my $subject = 'Test'; > my $attachment = “/pathtoapdffile/indata.pdf"; > my $thisLetter = "hello world <br> line 2"; > > my $mail = Email::Send::SMTP::Gmail->new( > -smtp => 'smtp.gmail.com', > -login => ‘user@gmail.com', > -pass => ‘password', > -layer => 'ssl', > -port => 465, > # -debug => 1, > ); > > $mail->send( > -to => $to, > -subject => $subject, > # -verbose => '1', > -contenttype=>'text/html', > -body => $thisLetter . '<br><br>', > -attachments => $attachment > ); > > $mail->bye; > </code> > > gives the following error on linux and Mac; > … > Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== > Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command channel: > at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. > > at the end of the pdf file. > I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to date > (0.88). > Have I missed anything? > > Thanks > Giles
Subject: Re: [rt.cpan.org #101832] I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Fri, 30 Jan 2015 15:38:30 +0000
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
It certainly works on Mac, but the technique you used to segment the pdf file appears to corrupt it and it cannot be read by the recipient :-( Giles On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > Hello, > > Thanks for this bug-report. > > I see that for some reason Google decided to change/adjust its SMTP server. > Your sample code works on my Linux machine connecting to servers other than Gmail, but as you said, fails with it. > > The issue seems to be related on how the attachment is processed. > I've changed the code so instead of sending the whole attachment file to the server, it sends it in several chunks. > > Based on my tests, now it works!, so please: > > Could you download the latest version from CPAN (I'm uploading 0.94) to give it a try? > > I really don't know why it works or not in Windows. Could you try the new release also in Windows? > > Hope this helps. > > > On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
>> I have a min repro case that works fine on windows but throws an error >> when run on Linux and Mac. I believe it is linked to bare line >> endings. >> >> This is the sample code; >> <code> >> use strict; >> use warnings; >> use Email::Send::SMTP::Gmail; >> my $username = ‘user@gmail.com'; >> my $password = ‘password'; >> my $to = ‘recipient@somewher.com'; >> my $from = 'user@gmail.com'; >> my $subject = 'Test'; >> my $attachment = “/pathtoapdffile/indata.pdf"; >> my $thisLetter = "hello world <br> line 2"; >> >> my $mail = Email::Send::SMTP::Gmail->new( >> -smtp => 'smtp.gmail.com', >> -login => ‘user@gmail.com', >> -pass => ‘password', >> -layer => 'ssl', >> -port => 465, >> # -debug => 1, >> ); >> >> $mail->send( >> -to => $to, >> -subject => $subject, >> # -verbose => '1', >> -contenttype=>'text/html', >> -body => $thisLetter . '<br><br>', >> -attachments => $attachment >> ); >> >> $mail->bye; >> </code> >> >> gives the following error on linux and Mac; >> … >> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== >> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command channel: >> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. >> >> at the end of the pdf file. >> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to date >> (0.88). >> Have I missed anything? >> >> Thanks >> Giles
> > >
Hi, I've tested with pdfs of different sizes without issues :-? Could you attach a pdf to reproduce the error? Thanks, Peco On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote: Show quoted text
> It certainly works on Mac, but the technique you used to segment the > pdf file appears to corrupt it and it cannot be read by the recipient > :-( > > Giles > > On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email-Send- > SMTP-Gmail@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > > > Hello, > > > > Thanks for this bug-report. > > > > I see that for some reason Google decided to change/adjust its SMTP > > server. > > Your sample code works on my Linux machine connecting to servers > > other than Gmail, but as you said, fails with it. > > > > The issue seems to be related on how the attachment is processed. > > I've changed the code so instead of sending the whole attachment file > > to the server, it sends it in several chunks. > > > > Based on my tests, now it works!, so please: > > > > Could you download the latest version from CPAN (I'm uploading 0.94) > > to give it a try? > > > > I really don't know why it works or not in Windows. Could you try the > > new release also in Windows? > > > > Hope this helps. > > > > > > On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
> >> I have a min repro case that works fine on windows but throws an > >> error > >> when run on Linux and Mac. I believe it is linked to bare line > >> endings. > >> > >> This is the sample code; > >> <code> > >> use strict; > >> use warnings; > >> use Email::Send::SMTP::Gmail; > >> my $username = ‘user@gmail.com'; > >> my $password = ‘password'; > >> my $to = ‘recipient@somewher.com'; > >> my $from = 'user@gmail.com'; > >> my $subject = 'Test'; > >> my $attachment = “/pathtoapdffile/indata.pdf"; > >> my $thisLetter = "hello world <br> line 2"; > >> > >> my $mail = Email::Send::SMTP::Gmail->new( > >> -smtp => 'smtp.gmail.com', > >> -login => ‘user@gmail.com', > >> -pass => ‘password', > >> -layer => 'ssl', > >> -port => 465, > >> # -debug => 1, > >> ); > >> > >> $mail->send( > >> -to => $to, > >> -subject => $subject, > >> # -verbose => '1', > >> -contenttype=>'text/html', > >> -body => $thisLetter . '<br><br>', > >> -attachments => $attachment > >> ); > >> > >> $mail->bye; > >> </code> > >> > >> gives the following error on linux and Mac; > >> … > >> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== > >> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command channel: > >> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. > >> > >> at the end of the pdf file. > >> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to date > >> (0.88). > >> Have I missed anything? > >> > >> Thanks > >> Giles
> > > > > >
Subject: Re: [rt.cpan.org #101832] I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Fri, 30 Jan 2015 15:54:25 +0000
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
Sorry I could have been more helpful, attached is a sample pdf and how it appears after going through gmail as well as a diff (using hex fiend) Giles
Screen Shot 2015-01-30 at 15.53.03.png
Download test.pdf
application/pdf 17.7k

Message body not shown because it is not plain text.

Download test-aftergmail.pdf
application/pdf 17.7k

Message body not shown because it is not plain text.

On 30 Jan 2015, at 15:38, Godart-Brown, Giles <giles@godartbrown.co.uk> wrote: Show quoted text
> It certainly works on Mac, but the technique you used to segment the pdf file appears to corrupt it and it cannot be read by the recipient :-( > > Giles > > On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: >
>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >> >> Hello, >> >> Thanks for this bug-report. >> >> I see that for some reason Google decided to change/adjust its SMTP server. >> Your sample code works on my Linux machine connecting to servers other than Gmail, but as you said, fails with it. >> >> The issue seems to be related on how the attachment is processed. >> I've changed the code so instead of sending the whole attachment file to the server, it sends it in several chunks. >> >> Based on my tests, now it works!, so please: >> >> Could you download the latest version from CPAN (I'm uploading 0.94) to give it a try? >> >> I really don't know why it works or not in Windows. Could you try the new release also in Windows? >> >> Hope this helps. >> >> >> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
>>> I have a min repro case that works fine on windows but throws an error >>> when run on Linux and Mac. I believe it is linked to bare line >>> endings. >>> >>> This is the sample code; >>> <code> >>> use strict; >>> use warnings; >>> use Email::Send::SMTP::Gmail; >>> my $username = ‘user@gmail.com'; >>> my $password = ‘password'; >>> my $to = ‘recipient@somewher.com'; >>> my $from = 'user@gmail.com'; >>> my $subject = 'Test'; >>> my $attachment = “/pathtoapdffile/indata.pdf"; >>> my $thisLetter = "hello world <br> line 2"; >>> >>> my $mail = Email::Send::SMTP::Gmail->new( >>> -smtp => 'smtp.gmail.com', >>> -login => ‘user@gmail.com', >>> -pass => ‘password', >>> -layer => 'ssl', >>> -port => 465, >>> # -debug => 1, >>> ); >>> >>> $mail->send( >>> -to => $to, >>> -subject => $subject, >>> # -verbose => '1', >>> -contenttype=>'text/html', >>> -body => $thisLetter . '<br><br>', >>> -attachments => $attachment >>> ); >>> >>> $mail->bye; >>> </code> >>> >>> gives the following error on linux and Mac; >>> … >>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== >>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command channel: >>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. >>> >>> at the end of the pdf file. >>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to date >>> (0.88). >>> Have I missed anything? >>> >>> Thanks >>> Giles
>> >> >>
>
Subject: Re: [rt.cpan.org #101832] I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Fri, 30 Jan 2015 15:55:01 +0000
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
our emails crossed Giles On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > Hi, > > I've tested with pdfs of different sizes without issues :-? > > Could you attach a pdf to reproduce the error? > > Thanks, > Peco > > On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
>> It certainly works on Mac, but the technique you used to segment the >> pdf file appears to corrupt it and it cannot be read by the recipient >> :-( >> >> Giles >> >> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email-Send- >> SMTP-Gmail@rt.cpan.org> wrote: >>
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>> >>> Hello, >>> >>> Thanks for this bug-report. >>> >>> I see that for some reason Google decided to change/adjust its SMTP >>> server. >>> Your sample code works on my Linux machine connecting to servers >>> other than Gmail, but as you said, fails with it. >>> >>> The issue seems to be related on how the attachment is processed. >>> I've changed the code so instead of sending the whole attachment file >>> to the server, it sends it in several chunks. >>> >>> Based on my tests, now it works!, so please: >>> >>> Could you download the latest version from CPAN (I'm uploading 0.94) >>> to give it a try? >>> >>> I really don't know why it works or not in Windows. Could you try the >>> new release also in Windows? >>> >>> Hope this helps. >>> >>> >>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
>>>> I have a min repro case that works fine on windows but throws an >>>> error >>>> when run on Linux and Mac. I believe it is linked to bare line >>>> endings. >>>> >>>> This is the sample code; >>>> <code> >>>> use strict; >>>> use warnings; >>>> use Email::Send::SMTP::Gmail; >>>> my $username = ‘user@gmail.com'; >>>> my $password = ‘password'; >>>> my $to = ‘recipient@somewher.com'; >>>> my $from = 'user@gmail.com'; >>>> my $subject = 'Test'; >>>> my $attachment = “/pathtoapdffile/indata.pdf"; >>>> my $thisLetter = "hello world <br> line 2"; >>>> >>>> my $mail = Email::Send::SMTP::Gmail->new( >>>> -smtp => 'smtp.gmail.com', >>>> -login => ‘user@gmail.com', >>>> -pass => ‘password', >>>> -layer => 'ssl', >>>> -port => 465, >>>> # -debug => 1, >>>> ); >>>> >>>> $mail->send( >>>> -to => $to, >>>> -subject => $subject, >>>> # -verbose => '1', >>>> -contenttype=>'text/html', >>>> -body => $thisLetter . '<br><br>', >>>> -attachments => $attachment >>>> ); >>>> >>>> $mail->bye; >>>> </code> >>>> >>>> gives the following error on linux and Mac; >>>> … >>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== >>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command channel: >>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. >>>> >>>> at the end of the pdf file. >>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to date >>>> (0.88). >>>> Have I missed anything? >>>> >>>> Thanks >>>> Giles
>>> >>> >>>
> > >
Got it. v 0.96 uploaded. Summary: 1) (It seems that) Google has added a limit for the transaction of attachments 2) Chunking the attachment works but the solution may depend on the email client. For example, v0.94 works well with Thunderbird but not with Google's web interface. The reason is that some email clients are smart to reconstruct fragmented attachments eliminating divisions, others ... not. 3) I didn't find documentation from Google's restriction, so based on an empirical work I release v0.96 that handle the situation. Creating the chunks taking care with the divisions of each segment. 4) Tested (only) on Linux using Thunderbird and Google's web. 5) What I really don't like is that we are partitioning the attachments when in some cases is not needed (any other SMTP than the Gmail) Peco On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote: Show quoted text
> our emails crossed > > Giles > > On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email-Send- > SMTP-Gmail@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > > > Hi, > > > > I've tested with pdfs of different sizes without issues :-? > > > > Could you attach a pdf to reproduce the error? > > > > Thanks, > > Peco > > > > On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
> >> It certainly works on Mac, but the technique you used to segment the > >> pdf file appears to corrupt it and it cannot be read by the > >> recipient > >> :-( > >> > >> Giles > >> > >> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email- > >> Send- > >> SMTP-Gmail@rt.cpan.org> wrote: > >>
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > >>> > >>> Hello, > >>> > >>> Thanks for this bug-report. > >>> > >>> I see that for some reason Google decided to change/adjust its SMTP > >>> server. > >>> Your sample code works on my Linux machine connecting to servers > >>> other than Gmail, but as you said, fails with it. > >>> > >>> The issue seems to be related on how the attachment is processed. > >>> I've changed the code so instead of sending the whole attachment > >>> file > >>> to the server, it sends it in several chunks. > >>> > >>> Based on my tests, now it works!, so please: > >>> > >>> Could you download the latest version from CPAN (I'm uploading > >>> 0.94) > >>> to give it a try? > >>> > >>> I really don't know why it works or not in Windows. Could you try > >>> the > >>> new release also in Windows? > >>> > >>> Hope this helps. > >>> > >>> > >>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
> >>>> I have a min repro case that works fine on windows but throws an > >>>> error > >>>> when run on Linux and Mac. I believe it is linked to bare line > >>>> endings. > >>>> > >>>> This is the sample code; > >>>> <code> > >>>> use strict; > >>>> use warnings; > >>>> use Email::Send::SMTP::Gmail; > >>>> my $username = ‘user@gmail.com'; > >>>> my $password = ‘password'; > >>>> my $to = ‘recipient@somewher.com'; > >>>> my $from = 'user@gmail.com'; > >>>> my $subject = 'Test'; > >>>> my $attachment = “/pathtoapdffile/indata.pdf"; > >>>> my $thisLetter = "hello world <br> line 2"; > >>>> > >>>> my $mail = Email::Send::SMTP::Gmail->new( > >>>> -smtp => 'smtp.gmail.com', > >>>> -login => ‘user@gmail.com', > >>>> -pass => ‘password', > >>>> -layer => 'ssl', > >>>> -port => 465, > >>>> # -debug => 1, > >>>> ); > >>>> > >>>> $mail->send( > >>>> -to => $to, > >>>> -subject => $subject, > >>>> # -verbose => '1', > >>>> -contenttype=>'text/html', > >>>> -body => $thisLetter . '<br><br>', > >>>> -attachments => $attachment > >>>> ); > >>>> > >>>> $mail->bye; > >>>> </code> > >>>> > >>>> gives the following error on linux and Mac; > >>>> … > >>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== > >>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command > >>>> channel: > >>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. > >>>> > >>>> at the end of the pdf file. > >>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to > >>>> date > >>>> (0.88). > >>>> Have I missed anything? > >>>> > >>>> Thanks > >>>> Giles
> >>> > >>> > >>>
> > > > > >
Subject: Re: [rt.cpan.org #101832] I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Fri, 30 Jan 2015 21:18:49 +0000
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
this stuff is never easy - thanks anyway for your quick response Giles On 30 Jan 2015, at 19:16, Juan Jose San Martin via RT <bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > Got it. v 0.96 uploaded. > > Summary: > > 1) (It seems that) Google has added a limit for the transaction of attachments > > 2) Chunking the attachment works but the solution may depend on the email client. For example, v0.94 works well with Thunderbird but not with Google's web interface. > The reason is that some email clients are smart to reconstruct fragmented attachments eliminating divisions, others ... not. > > 3) I didn't find documentation from Google's restriction, so based on an empirical work I release v0.96 that handle the situation. Creating the chunks taking care with the divisions of each segment. > > 4) Tested (only) on Linux using Thunderbird and Google's web. > > 5) What I really don't like is that we are partitioning the attachments when in some cases is not needed (any other SMTP than the Gmail) > > Peco > > On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote:
>> our emails crossed >> >> Giles >> >> On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email-Send- >> SMTP-Gmail@rt.cpan.org> wrote: >>
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>> >>> Hi, >>> >>> I've tested with pdfs of different sizes without issues :-? >>> >>> Could you attach a pdf to reproduce the error? >>> >>> Thanks, >>> Peco >>> >>> On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
>>>> It certainly works on Mac, but the technique you used to segment the >>>> pdf file appears to corrupt it and it cannot be read by the >>>> recipient >>>> :-( >>>> >>>> Giles >>>> >>>> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email- >>>> Send- >>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>> >>>>> Hello, >>>>> >>>>> Thanks for this bug-report. >>>>> >>>>> I see that for some reason Google decided to change/adjust its SMTP >>>>> server. >>>>> Your sample code works on my Linux machine connecting to servers >>>>> other than Gmail, but as you said, fails with it. >>>>> >>>>> The issue seems to be related on how the attachment is processed. >>>>> I've changed the code so instead of sending the whole attachment >>>>> file >>>>> to the server, it sends it in several chunks. >>>>> >>>>> Based on my tests, now it works!, so please: >>>>> >>>>> Could you download the latest version from CPAN (I'm uploading >>>>> 0.94) >>>>> to give it a try? >>>>> >>>>> I really don't know why it works or not in Windows. Could you try >>>>> the >>>>> new release also in Windows? >>>>> >>>>> Hope this helps. >>>>> >>>>> >>>>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
>>>>>> I have a min repro case that works fine on windows but throws an >>>>>> error >>>>>> when run on Linux and Mac. I believe it is linked to bare line >>>>>> endings. >>>>>> >>>>>> This is the sample code; >>>>>> <code> >>>>>> use strict; >>>>>> use warnings; >>>>>> use Email::Send::SMTP::Gmail; >>>>>> my $username = ‘user@gmail.com'; >>>>>> my $password = ‘password'; >>>>>> my $to = ‘recipient@somewher.com'; >>>>>> my $from = 'user@gmail.com'; >>>>>> my $subject = 'Test'; >>>>>> my $attachment = “/pathtoapdffile/indata.pdf"; >>>>>> my $thisLetter = "hello world <br> line 2"; >>>>>> >>>>>> my $mail = Email::Send::SMTP::Gmail->new( >>>>>> -smtp => 'smtp.gmail.com', >>>>>> -login => ‘user@gmail.com', >>>>>> -pass => ‘password', >>>>>> -layer => 'ssl', >>>>>> -port => 465, >>>>>> # -debug => 1, >>>>>> ); >>>>>> >>>>>> $mail->send( >>>>>> -to => $to, >>>>>> -subject => $subject, >>>>>> # -verbose => '1', >>>>>> -contenttype=>'text/html', >>>>>> -body => $thisLetter . '<br><br>', >>>>>> -attachments => $attachment >>>>>> ); >>>>>> >>>>>> $mail->bye; >>>>>> </code> >>>>>> >>>>>> gives the following error on linux and Mac; >>>>>> … >>>>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== >>>>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command >>>>>> channel: >>>>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. >>>>>> >>>>>> at the end of the pdf file. >>>>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to >>>>>> date >>>>>> (0.88). >>>>>> Have I missed anything? >>>>>> >>>>>> Thanks >>>>>> Giles
>>>>> >>>>> >>>>>
>>> >>> >>>
> > >
Give a try to v0.96 during the next days and I will close the bug-report as resolved. Thanks Peco On Fri Jan 30 16:19:31 2015, giles@godartbrown.co.uk wrote: Show quoted text
> this stuff is never easy - thanks anyway for your quick response > > Giles > > On 30 Jan 2015, at 19:16, Juan Jose San Martin via RT <bug-Email-Send- > SMTP-Gmail@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > > > Got it. v 0.96 uploaded. > > > > Summary: > > > > 1) (It seems that) Google has added a limit for the transaction of > > attachments > > > > 2) Chunking the attachment works but the solution may depend on the > > email client. For example, v0.94 works well with Thunderbird but not > > with Google's web interface. > > The reason is that some email clients are smart to reconstruct > > fragmented attachments eliminating divisions, others ... not. > > > > 3) I didn't find documentation from Google's restriction, so based on > > an empirical work I release v0.96 that handle the situation. Creating > > the chunks taking care with the divisions of each segment. > > > > 4) Tested (only) on Linux using Thunderbird and Google's web. > > > > 5) What I really don't like is that we are partitioning the > > attachments when in some cases is not needed (any other SMTP than the > > Gmail) > > > > Peco > > > > On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote:
> >> our emails crossed > >> > >> Giles > >> > >> On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email- > >> Send- > >> SMTP-Gmail@rt.cpan.org> wrote: > >>
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > >>> > >>> Hi, > >>> > >>> I've tested with pdfs of different sizes without issues :-? > >>> > >>> Could you attach a pdf to reproduce the error? > >>> > >>> Thanks, > >>> Peco > >>> > >>> On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
> >>>> It certainly works on Mac, but the technique you used to segment > >>>> the > >>>> pdf file appears to corrupt it and it cannot be read by the > >>>> recipient > >>>> :-( > >>>> > >>>> Giles > >>>> > >>>> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email- > >>>> Send- > >>>> SMTP-Gmail@rt.cpan.org> wrote: > >>>>
> >>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > >>>>> > >>>>> Hello, > >>>>> > >>>>> Thanks for this bug-report. > >>>>> > >>>>> I see that for some reason Google decided to change/adjust its > >>>>> SMTP > >>>>> server. > >>>>> Your sample code works on my Linux machine connecting to servers > >>>>> other than Gmail, but as you said, fails with it. > >>>>> > >>>>> The issue seems to be related on how the attachment is processed. > >>>>> I've changed the code so instead of sending the whole attachment > >>>>> file > >>>>> to the server, it sends it in several chunks. > >>>>> > >>>>> Based on my tests, now it works!, so please: > >>>>> > >>>>> Could you download the latest version from CPAN (I'm uploading > >>>>> 0.94) > >>>>> to give it a try? > >>>>> > >>>>> I really don't know why it works or not in Windows. Could you try > >>>>> the > >>>>> new release also in Windows? > >>>>> > >>>>> Hope this helps. > >>>>> > >>>>> > >>>>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
> >>>>>> I have a min repro case that works fine on windows but throws an > >>>>>> error > >>>>>> when run on Linux and Mac. I believe it is linked to bare line > >>>>>> endings. > >>>>>> > >>>>>> This is the sample code; > >>>>>> <code> > >>>>>> use strict; > >>>>>> use warnings; > >>>>>> use Email::Send::SMTP::Gmail; > >>>>>> my $username = ‘user@gmail.com'; > >>>>>> my $password = ‘password'; > >>>>>> my $to = ‘recipient@somewher.com'; > >>>>>> my $from = 'user@gmail.com'; > >>>>>> my $subject = 'Test'; > >>>>>> my $attachment = “/pathtoapdffile/indata.pdf"; > >>>>>> my $thisLetter = "hello world <br> line 2"; > >>>>>> > >>>>>> my $mail = Email::Send::SMTP::Gmail->new( > >>>>>> -smtp => 'smtp.gmail.com', > >>>>>> -login => ‘user@gmail.com', > >>>>>> -pass => ‘password', > >>>>>> -layer => 'ssl', > >>>>>> -port => 465, > >>>>>> # -debug => 1, > >>>>>> ); > >>>>>> > >>>>>> $mail->send( > >>>>>> -to => $to, > >>>>>> -subject => $subject, > >>>>>> # -verbose => '1', > >>>>>> -contenttype=>'text/html', > >>>>>> -body => $thisLetter . '<br><br>', > >>>>>> -attachments => $attachment > >>>>>> ); > >>>>>> > >>>>>> $mail->bye; > >>>>>> </code> > >>>>>> > >>>>>> gives the following error on linux and Mac; > >>>>>> … > >>>>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== > >>>>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command > >>>>>> channel: > >>>>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. > >>>>>> > >>>>>> at the end of the pdf file. > >>>>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to > >>>>>> date > >>>>>> (0.88). > >>>>>> Have I missed anything? > >>>>>> > >>>>>> Thanks > >>>>>> Giles
> >>>>> > >>>>> > >>>>>
> >>> > >>> > >>>
> > > > > >
Subject: Re: [rt.cpan.org #101832] I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Sat, 31 Jan 2015 08:38:42 +0000
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
I did a MCPAN reload index but it still says my 0.94 version is up to date :-( will try again later Giles On 30 Jan 2015, at 21:42, Juan Jose San Martin via RT <bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > Give a try to v0.96 during the next days and I will close the bug-report as resolved. > > Thanks > Peco > > On Fri Jan 30 16:19:31 2015, giles@godartbrown.co.uk wrote:
>> this stuff is never easy - thanks anyway for your quick response >> >> Giles >> >> On 30 Jan 2015, at 19:16, Juan Jose San Martin via RT <bug-Email-Send- >> SMTP-Gmail@rt.cpan.org> wrote: >>
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>> >>> Got it. v 0.96 uploaded. >>> >>> Summary: >>> >>> 1) (It seems that) Google has added a limit for the transaction of >>> attachments >>> >>> 2) Chunking the attachment works but the solution may depend on the >>> email client. For example, v0.94 works well with Thunderbird but not >>> with Google's web interface. >>> The reason is that some email clients are smart to reconstruct >>> fragmented attachments eliminating divisions, others ... not. >>> >>> 3) I didn't find documentation from Google's restriction, so based on >>> an empirical work I release v0.96 that handle the situation. Creating >>> the chunks taking care with the divisions of each segment. >>> >>> 4) Tested (only) on Linux using Thunderbird and Google's web. >>> >>> 5) What I really don't like is that we are partitioning the >>> attachments when in some cases is not needed (any other SMTP than the >>> Gmail) >>> >>> Peco >>> >>> On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote:
>>>> our emails crossed >>>> >>>> Giles >>>> >>>> On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email- >>>> Send- >>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>> >>>>> Hi, >>>>> >>>>> I've tested with pdfs of different sizes without issues :-? >>>>> >>>>> Could you attach a pdf to reproduce the error? >>>>> >>>>> Thanks, >>>>> Peco >>>>> >>>>> On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
>>>>>> It certainly works on Mac, but the technique you used to segment >>>>>> the >>>>>> pdf file appears to corrupt it and it cannot be read by the >>>>>> recipient >>>>>> :-( >>>>>> >>>>>> Giles >>>>>> >>>>>> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email- >>>>>> Send- >>>>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>>>
>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> Thanks for this bug-report. >>>>>>> >>>>>>> I see that for some reason Google decided to change/adjust its >>>>>>> SMTP >>>>>>> server. >>>>>>> Your sample code works on my Linux machine connecting to servers >>>>>>> other than Gmail, but as you said, fails with it. >>>>>>> >>>>>>> The issue seems to be related on how the attachment is processed. >>>>>>> I've changed the code so instead of sending the whole attachment >>>>>>> file >>>>>>> to the server, it sends it in several chunks. >>>>>>> >>>>>>> Based on my tests, now it works!, so please: >>>>>>> >>>>>>> Could you download the latest version from CPAN (I'm uploading >>>>>>> 0.94) >>>>>>> to give it a try? >>>>>>> >>>>>>> I really don't know why it works or not in Windows. Could you try >>>>>>> the >>>>>>> new release also in Windows? >>>>>>> >>>>>>> Hope this helps. >>>>>>> >>>>>>> >>>>>>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
>>>>>>>> I have a min repro case that works fine on windows but throws an >>>>>>>> error >>>>>>>> when run on Linux and Mac. I believe it is linked to bare line >>>>>>>> endings. >>>>>>>> >>>>>>>> This is the sample code; >>>>>>>> <code> >>>>>>>> use strict; >>>>>>>> use warnings; >>>>>>>> use Email::Send::SMTP::Gmail; >>>>>>>> my $username = ‘user@gmail.com'; >>>>>>>> my $password = ‘password'; >>>>>>>> my $to = ‘recipient@somewher.com'; >>>>>>>> my $from = 'user@gmail.com'; >>>>>>>> my $subject = 'Test'; >>>>>>>> my $attachment = “/pathtoapdffile/indata.pdf"; >>>>>>>> my $thisLetter = "hello world <br> line 2"; >>>>>>>> >>>>>>>> my $mail = Email::Send::SMTP::Gmail->new( >>>>>>>> -smtp => 'smtp.gmail.com', >>>>>>>> -login => ‘user@gmail.com', >>>>>>>> -pass => ‘password', >>>>>>>> -layer => 'ssl', >>>>>>>> -port => 465, >>>>>>>> # -debug => 1, >>>>>>>> ); >>>>>>>> >>>>>>>> $mail->send( >>>>>>>> -to => $to, >>>>>>>> -subject => $subject, >>>>>>>> # -verbose => '1', >>>>>>>> -contenttype=>'text/html', >>>>>>>> -body => $thisLetter . '<br><br>', >>>>>>>> -attachments => $attachment >>>>>>>> ); >>>>>>>> >>>>>>>> $mail->bye; >>>>>>>> </code> >>>>>>>> >>>>>>>> gives the following error on linux and Mac; >>>>>>>> … >>>>>>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== >>>>>>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command >>>>>>>> channel: >>>>>>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. >>>>>>>> >>>>>>>> at the end of the pdf file. >>>>>>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to >>>>>>>> date >>>>>>>> (0.88). >>>>>>>> Have I missed anything? >>>>>>>> >>>>>>>> Thanks >>>>>>>> Giles
>>>>>>> >>>>>>> >>>>>>>
>>>>> >>>>> >>>>>
>>> >>> >>>
> > >
Subject: Re: [rt.cpan.org #101832] I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Sat, 31 Jan 2015 08:46:44 +0000
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
I manually downloaded 0.96 and it ran fine with a couple of binary files I tested on Mac, will do a Windows run in the week. Many thanks Giles On 30 Jan 2015, at 21:42, Juan Jose San Martin via RT <bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > Give a try to v0.96 during the next days and I will close the bug-report as resolved. > > Thanks > Peco > > On Fri Jan 30 16:19:31 2015, giles@godartbrown.co.uk wrote:
>> this stuff is never easy - thanks anyway for your quick response >> >> Giles >> >> On 30 Jan 2015, at 19:16, Juan Jose San Martin via RT <bug-Email-Send- >> SMTP-Gmail@rt.cpan.org> wrote: >>
>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>> >>> Got it. v 0.96 uploaded. >>> >>> Summary: >>> >>> 1) (It seems that) Google has added a limit for the transaction of >>> attachments >>> >>> 2) Chunking the attachment works but the solution may depend on the >>> email client. For example, v0.94 works well with Thunderbird but not >>> with Google's web interface. >>> The reason is that some email clients are smart to reconstruct >>> fragmented attachments eliminating divisions, others ... not. >>> >>> 3) I didn't find documentation from Google's restriction, so based on >>> an empirical work I release v0.96 that handle the situation. Creating >>> the chunks taking care with the divisions of each segment. >>> >>> 4) Tested (only) on Linux using Thunderbird and Google's web. >>> >>> 5) What I really don't like is that we are partitioning the >>> attachments when in some cases is not needed (any other SMTP than the >>> Gmail) >>> >>> Peco >>> >>> On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote:
>>>> our emails crossed >>>> >>>> Giles >>>> >>>> On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email- >>>> Send- >>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>
>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>> >>>>> Hi, >>>>> >>>>> I've tested with pdfs of different sizes without issues :-? >>>>> >>>>> Could you attach a pdf to reproduce the error? >>>>> >>>>> Thanks, >>>>> Peco >>>>> >>>>> On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
>>>>>> It certainly works on Mac, but the technique you used to segment >>>>>> the >>>>>> pdf file appears to corrupt it and it cannot be read by the >>>>>> recipient >>>>>> :-( >>>>>> >>>>>> Giles >>>>>> >>>>>> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug-Email- >>>>>> Send- >>>>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>>>
>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> Thanks for this bug-report. >>>>>>> >>>>>>> I see that for some reason Google decided to change/adjust its >>>>>>> SMTP >>>>>>> server. >>>>>>> Your sample code works on my Linux machine connecting to servers >>>>>>> other than Gmail, but as you said, fails with it. >>>>>>> >>>>>>> The issue seems to be related on how the attachment is processed. >>>>>>> I've changed the code so instead of sending the whole attachment >>>>>>> file >>>>>>> to the server, it sends it in several chunks. >>>>>>> >>>>>>> Based on my tests, now it works!, so please: >>>>>>> >>>>>>> Could you download the latest version from CPAN (I'm uploading >>>>>>> 0.94) >>>>>>> to give it a try? >>>>>>> >>>>>>> I really don't know why it works or not in Windows. Could you try >>>>>>> the >>>>>>> new release also in Windows? >>>>>>> >>>>>>> Hope this helps. >>>>>>> >>>>>>> >>>>>>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
>>>>>>>> I have a min repro case that works fine on windows but throws an >>>>>>>> error >>>>>>>> when run on Linux and Mac. I believe it is linked to bare line >>>>>>>> endings. >>>>>>>> >>>>>>>> This is the sample code; >>>>>>>> <code> >>>>>>>> use strict; >>>>>>>> use warnings; >>>>>>>> use Email::Send::SMTP::Gmail; >>>>>>>> my $username = ‘user@gmail.com'; >>>>>>>> my $password = ‘password'; >>>>>>>> my $to = ‘recipient@somewher.com'; >>>>>>>> my $from = 'user@gmail.com'; >>>>>>>> my $subject = 'Test'; >>>>>>>> my $attachment = “/pathtoapdffile/indata.pdf"; >>>>>>>> my $thisLetter = "hello world <br> line 2"; >>>>>>>> >>>>>>>> my $mail = Email::Send::SMTP::Gmail->new( >>>>>>>> -smtp => 'smtp.gmail.com', >>>>>>>> -login => ‘user@gmail.com', >>>>>>>> -pass => ‘password', >>>>>>>> -layer => 'ssl', >>>>>>>> -port => 465, >>>>>>>> # -debug => 1, >>>>>>>> ); >>>>>>>> >>>>>>>> $mail->send( >>>>>>>> -to => $to, >>>>>>>> -subject => $subject, >>>>>>>> # -verbose => '1', >>>>>>>> -contenttype=>'text/html', >>>>>>>> -body => $thisLetter . '<br><br>', >>>>>>>> -attachments => $attachment >>>>>>>> ); >>>>>>>> >>>>>>>> $mail->bye; >>>>>>>> </code> >>>>>>>> >>>>>>>> gives the following error on linux and Mac; >>>>>>>> … >>>>>>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== >>>>>>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command >>>>>>>> channel: >>>>>>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. >>>>>>>> >>>>>>>> at the end of the pdf file. >>>>>>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to >>>>>>>> date >>>>>>>> (0.88). >>>>>>>> Have I missed anything? >>>>>>>> >>>>>>>> Thanks >>>>>>>> Giles
>>>>>>> >>>>>>> >>>>>>>
>>>>> >>>>> >>>>>
>>> >>> >>>
> > >
Thanks for do this manually! Hope it be indexed by CPAN soon. Peco On Sat Jan 31 03:46:56 2015, giles@godartbrown.co.uk wrote: Show quoted text
> I manually downloaded 0.96 and it ran fine with a couple of binary > files I tested on Mac, will do a Windows run in the week. > > Many thanks > > Giles > > On 30 Jan 2015, at 21:42, Juan Jose San Martin via RT <bug-Email-Send- > SMTP-Gmail@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > > > Give a try to v0.96 during the next days and I will close the bug- > > report as resolved. > > > > Thanks > > Peco > > > > On Fri Jan 30 16:19:31 2015, giles@godartbrown.co.uk wrote:
> >> this stuff is never easy - thanks anyway for your quick response > >> > >> Giles > >> > >> On 30 Jan 2015, at 19:16, Juan Jose San Martin via RT <bug-Email- > >> Send- > >> SMTP-Gmail@rt.cpan.org> wrote: > >>
> >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > >>> > >>> Got it. v 0.96 uploaded. > >>> > >>> Summary: > >>> > >>> 1) (It seems that) Google has added a limit for the transaction of > >>> attachments > >>> > >>> 2) Chunking the attachment works but the solution may depend on the > >>> email client. For example, v0.94 works well with Thunderbird but > >>> not > >>> with Google's web interface. > >>> The reason is that some email clients are smart to reconstruct > >>> fragmented attachments eliminating divisions, others ... not. > >>> > >>> 3) I didn't find documentation from Google's restriction, so based > >>> on > >>> an empirical work I release v0.96 that handle the situation. > >>> Creating > >>> the chunks taking care with the divisions of each segment. > >>> > >>> 4) Tested (only) on Linux using Thunderbird and Google's web. > >>> > >>> 5) What I really don't like is that we are partitioning the > >>> attachments when in some cases is not needed (any other SMTP than > >>> the > >>> Gmail) > >>> > >>> Peco > >>> > >>> On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote:
> >>>> our emails crossed > >>>> > >>>> Giles > >>>> > >>>> On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email- > >>>> Send- > >>>> SMTP-Gmail@rt.cpan.org> wrote: > >>>>
> >>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > >>>>> > >>>>> Hi, > >>>>> > >>>>> I've tested with pdfs of different sizes without issues :-? > >>>>> > >>>>> Could you attach a pdf to reproduce the error? > >>>>> > >>>>> Thanks, > >>>>> Peco > >>>>> > >>>>> On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
> >>>>>> It certainly works on Mac, but the technique you used to segment > >>>>>> the > >>>>>> pdf file appears to corrupt it and it cannot be read by the > >>>>>> recipient > >>>>>> :-( > >>>>>> > >>>>>> Giles > >>>>>> > >>>>>> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug- > >>>>>> Email- > >>>>>> Send- > >>>>>> SMTP-Gmail@rt.cpan.org> wrote: > >>>>>>
> >>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > >>>>>>> > >>>>>>> Hello, > >>>>>>> > >>>>>>> Thanks for this bug-report. > >>>>>>> > >>>>>>> I see that for some reason Google decided to change/adjust its > >>>>>>> SMTP > >>>>>>> server. > >>>>>>> Your sample code works on my Linux machine connecting to > >>>>>>> servers > >>>>>>> other than Gmail, but as you said, fails with it. > >>>>>>> > >>>>>>> The issue seems to be related on how the attachment is > >>>>>>> processed. > >>>>>>> I've changed the code so instead of sending the whole > >>>>>>> attachment > >>>>>>> file > >>>>>>> to the server, it sends it in several chunks. > >>>>>>> > >>>>>>> Based on my tests, now it works!, so please: > >>>>>>> > >>>>>>> Could you download the latest version from CPAN (I'm uploading > >>>>>>> 0.94) > >>>>>>> to give it a try? > >>>>>>> > >>>>>>> I really don't know why it works or not in Windows. Could you > >>>>>>> try > >>>>>>> the > >>>>>>> new release also in Windows? > >>>>>>> > >>>>>>> Hope this helps. > >>>>>>> > >>>>>>> > >>>>>>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
> >>>>>>>> I have a min repro case that works fine on windows but throws > >>>>>>>> an > >>>>>>>> error > >>>>>>>> when run on Linux and Mac. I believe it is linked to bare > >>>>>>>> line > >>>>>>>> endings. > >>>>>>>> > >>>>>>>> This is the sample code; > >>>>>>>> <code> > >>>>>>>> use strict; > >>>>>>>> use warnings; > >>>>>>>> use Email::Send::SMTP::Gmail; > >>>>>>>> my $username = ‘user@gmail.com'; > >>>>>>>> my $password = ‘password'; > >>>>>>>> my $to = ‘recipient@somewher.com'; > >>>>>>>> my $from = 'user@gmail.com'; > >>>>>>>> my $subject = 'Test'; > >>>>>>>> my $attachment = “/pathtoapdffile/indata.pdf"; > >>>>>>>> my $thisLetter = "hello world <br> line 2"; > >>>>>>>> > >>>>>>>> my $mail = Email::Send::SMTP::Gmail->new( > >>>>>>>> -smtp => 'smtp.gmail.com', > >>>>>>>> -login => ‘user@gmail.com', > >>>>>>>> -pass => ‘password', > >>>>>>>> -layer => 'ssl', > >>>>>>>> -port => 465, > >>>>>>>> # -debug => 1, > >>>>>>>> ); > >>>>>>>> > >>>>>>>> $mail->send( > >>>>>>>> -to => $to, > >>>>>>>> -subject => $subject, > >>>>>>>> # -verbose => '1', > >>>>>>>> -contenttype=>'text/html', > >>>>>>>> -body => $thisLetter . '<br><br>', > >>>>>>>> -attachments => $attachment > >>>>>>>> ); > >>>>>>>> > >>>>>>>> $mail->bye; > >>>>>>>> </code> > >>>>>>>> > >>>>>>>> gives the following error on linux and Mac; > >>>>>>>> … > >>>>>>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== > >>>>>>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command > >>>>>>>> channel: > >>>>>>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. > >>>>>>>> > >>>>>>>> at the end of the pdf file. > >>>>>>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to > >>>>>>>> date > >>>>>>>> (0.88). > >>>>>>>> Have I missed anything? > >>>>>>>> > >>>>>>>> Thanks > >>>>>>>> Giles
> >>>>>>> > >>>>>>> > >>>>>>>
> >>>>> > >>>>> > >>>>>
> >>> > >>> > >>>
> > > > > >
On Sat Jan 31 04:28:01 2015, PECO wrote: Show quoted text
> Thanks for do this manually! > > Hope it be indexed by CPAN soon. > > Peco > > On Sat Jan 31 03:46:56 2015, giles@godartbrown.co.uk wrote:
> > I manually downloaded 0.96 and it ran fine with a couple of binary > > files I tested on Mac, will do a Windows run in the week. > > > > Many thanks > > > > Giles > > > > On 30 Jan 2015, at 21:42, Juan Jose San Martin via RT <bug-Email-Send- > > SMTP-Gmail@rt.cpan.org> wrote: > >
> > > <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > > > > > Give a try to v0.96 during the next days and I will close the bug- > > > report as resolved. > > > > > > Thanks > > > Peco > > > > > > On Fri Jan 30 16:19:31 2015, giles@godartbrown.co.uk wrote:
> > >> this stuff is never easy - thanks anyway for your quick response > > >> > > >> Giles > > >> > > >> On 30 Jan 2015, at 19:16, Juan Jose San Martin via RT <bug-Email- > > >> Send- > > >> SMTP-Gmail@rt.cpan.org> wrote: > > >>
> > >>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > >>> > > >>> Got it. v 0.96 uploaded. > > >>> > > >>> Summary: > > >>> > > >>> 1) (It seems that) Google has added a limit for the transaction of > > >>> attachments > > >>> > > >>> 2) Chunking the attachment works but the solution may depend on the > > >>> email client. For example, v0.94 works well with Thunderbird but > > >>> not > > >>> with Google's web interface. > > >>> The reason is that some email clients are smart to reconstruct > > >>> fragmented attachments eliminating divisions, others ... not. > > >>> > > >>> 3) I didn't find documentation from Google's restriction, so based > > >>> on > > >>> an empirical work I release v0.96 that handle the situation. > > >>> Creating > > >>> the chunks taking care with the divisions of each segment. > > >>> > > >>> 4) Tested (only) on Linux using Thunderbird and Google's web. > > >>> > > >>> 5) What I really don't like is that we are partitioning the > > >>> attachments when in some cases is not needed (any other SMTP than > > >>> the > > >>> Gmail) > > >>> > > >>> Peco > > >>> > > >>> On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote:
> > >>>> our emails crossed > > >>>> > > >>>> Giles > > >>>> > > >>>> On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email- > > >>>> Send- > > >>>> SMTP-Gmail@rt.cpan.org> wrote: > > >>>>
> > >>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > >>>>> > > >>>>> Hi, > > >>>>> > > >>>>> I've tested with pdfs of different sizes without issues :-? > > >>>>> > > >>>>> Could you attach a pdf to reproduce the error? > > >>>>> > > >>>>> Thanks, > > >>>>> Peco > > >>>>> > > >>>>> On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
> > >>>>>> It certainly works on Mac, but the technique you used to segment > > >>>>>> the > > >>>>>> pdf file appears to corrupt it and it cannot be read by the > > >>>>>> recipient > > >>>>>> :-( > > >>>>>> > > >>>>>> Giles > > >>>>>> > > >>>>>> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug- > > >>>>>> Email- > > >>>>>> Send- > > >>>>>> SMTP-Gmail@rt.cpan.org> wrote: > > >>>>>>
> > >>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > >>>>>>> > > >>>>>>> Hello, > > >>>>>>> > > >>>>>>> Thanks for this bug-report. > > >>>>>>> > > >>>>>>> I see that for some reason Google decided to change/adjust its > > >>>>>>> SMTP > > >>>>>>> server. > > >>>>>>> Your sample code works on my Linux machine connecting to > > >>>>>>> servers > > >>>>>>> other than Gmail, but as you said, fails with it. > > >>>>>>> > > >>>>>>> The issue seems to be related on how the attachment is > > >>>>>>> processed. > > >>>>>>> I've changed the code so instead of sending the whole > > >>>>>>> attachment > > >>>>>>> file > > >>>>>>> to the server, it sends it in several chunks. > > >>>>>>> > > >>>>>>> Based on my tests, now it works!, so please: > > >>>>>>> > > >>>>>>> Could you download the latest version from CPAN (I'm uploading > > >>>>>>> 0.94) > > >>>>>>> to give it a try? > > >>>>>>> > > >>>>>>> I really don't know why it works or not in Windows. Could you > > >>>>>>> try > > >>>>>>> the > > >>>>>>> new release also in Windows? > > >>>>>>> > > >>>>>>> Hope this helps. > > >>>>>>> > > >>>>>>> > > >>>>>>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
> > >>>>>>>> I have a min repro case that works fine on windows but throws > > >>>>>>>> an > > >>>>>>>> error > > >>>>>>>> when run on Linux and Mac. I believe it is linked to bare > > >>>>>>>> line > > >>>>>>>> endings. > > >>>>>>>> > > >>>>>>>> This is the sample code; > > >>>>>>>> <code> > > >>>>>>>> use strict; > > >>>>>>>> use warnings; > > >>>>>>>> use Email::Send::SMTP::Gmail; > > >>>>>>>> my $username = ‘user@gmail.com'; > > >>>>>>>> my $password = ‘password'; > > >>>>>>>> my $to = ‘recipient@somewher.com'; > > >>>>>>>> my $from = 'user@gmail.com'; > > >>>>>>>> my $subject = 'Test'; > > >>>>>>>> my $attachment = “/pathtoapdffile/indata.pdf"; > > >>>>>>>> my $thisLetter = "hello world <br> line 2"; > > >>>>>>>> > > >>>>>>>> my $mail = Email::Send::SMTP::Gmail->new( > > >>>>>>>> -smtp => 'smtp.gmail.com', > > >>>>>>>> -login => ‘user@gmail.com', > > >>>>>>>> -pass => ‘password', > > >>>>>>>> -layer => 'ssl', > > >>>>>>>> -port => 465, > > >>>>>>>> # -debug => 1, > > >>>>>>>> ); > > >>>>>>>> > > >>>>>>>> $mail->send( > > >>>>>>>> -to => $to, > > >>>>>>>> -subject => $subject, > > >>>>>>>> # -verbose => '1', > > >>>>>>>> -contenttype=>'text/html', > > >>>>>>>> -body => $thisLetter . '<br><br>', > > >>>>>>>> -attachments => $attachment > > >>>>>>>> ); > > >>>>>>>> > > >>>>>>>> $mail->bye; > > >>>>>>>> </code> > > >>>>>>>> > > >>>>>>>> gives the following error on linux and Mac; > > >>>>>>>> … > > >>>>>>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== > > >>>>>>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command > > >>>>>>>> channel: > > >>>>>>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. > > >>>>>>>> > > >>>>>>>> at the end of the pdf file. > > >>>>>>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to > > >>>>>>>> date > > >>>>>>>> (0.88). > > >>>>>>>> Have I missed anything? > > >>>>>>>> > > >>>>>>>> Thanks > > >>>>>>>> Giles
> > >>>>>>> > > >>>>>>> > > >>>>>>>
> > >>>>> > > >>>>> > > >>>>>
> > >>> > > >>> > > >>>
> > > > > > > > >
> >
Subject: Re: [rt.cpan.org #101832] I believe there is a problem with Email:Send:SMTP:Gmail and attachments on linux machines
Date: Fri, 1 May 2015 10:12:22 +0100
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: "Godart-Brown, Giles" <giles [...] godartbrown.co.uk>
Thanks - all is good Giles On 1 May 2015, at 10:06, Juan Jose San Martin via RT <bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > > > On Sat Jan 31 04:28:01 2015, PECO wrote:
>> Thanks for do this manually! >> >> Hope it be indexed by CPAN soon. >> >> Peco >> >> On Sat Jan 31 03:46:56 2015, giles@godartbrown.co.uk wrote:
>>> I manually downloaded 0.96 and it ran fine with a couple of binary >>> files I tested on Mac, will do a Windows run in the week. >>> >>> Many thanks >>> >>> Giles >>> >>> On 30 Jan 2015, at 21:42, Juan Jose San Martin via RT <bug-Email-Send- >>> SMTP-Gmail@rt.cpan.org> wrote: >>>
>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>> >>>> Give a try to v0.96 during the next days and I will close the bug- >>>> report as resolved. >>>> >>>> Thanks >>>> Peco >>>> >>>> On Fri Jan 30 16:19:31 2015, giles@godartbrown.co.uk wrote:
>>>>> this stuff is never easy - thanks anyway for your quick response >>>>> >>>>> Giles >>>>> >>>>> On 30 Jan 2015, at 19:16, Juan Jose San Martin via RT <bug-Email- >>>>> Send- >>>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>>
>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>>> >>>>>> Got it. v 0.96 uploaded. >>>>>> >>>>>> Summary: >>>>>> >>>>>> 1) (It seems that) Google has added a limit for the transaction of >>>>>> attachments >>>>>> >>>>>> 2) Chunking the attachment works but the solution may depend on the >>>>>> email client. For example, v0.94 works well with Thunderbird but >>>>>> not >>>>>> with Google's web interface. >>>>>> The reason is that some email clients are smart to reconstruct >>>>>> fragmented attachments eliminating divisions, others ... not. >>>>>> >>>>>> 3) I didn't find documentation from Google's restriction, so based >>>>>> on >>>>>> an empirical work I release v0.96 that handle the situation. >>>>>> Creating >>>>>> the chunks taking care with the divisions of each segment. >>>>>> >>>>>> 4) Tested (only) on Linux using Thunderbird and Google's web. >>>>>> >>>>>> 5) What I really don't like is that we are partitioning the >>>>>> attachments when in some cases is not needed (any other SMTP than >>>>>> the >>>>>> Gmail) >>>>>> >>>>>> Peco >>>>>> >>>>>> On Fri Jan 30 10:55:14 2015, giles@godartbrown.co.uk wrote:
>>>>>>> our emails crossed >>>>>>> >>>>>>> Giles >>>>>>> >>>>>>> On 30 Jan 2015, at 15:52, Juan Jose San Martin via RT <bug-Email- >>>>>>> Send- >>>>>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>>>>
>>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>>>>> >>>>>>>> Hi, >>>>>>>> >>>>>>>> I've tested with pdfs of different sizes without issues :-? >>>>>>>> >>>>>>>> Could you attach a pdf to reproduce the error? >>>>>>>> >>>>>>>> Thanks, >>>>>>>> Peco >>>>>>>> >>>>>>>> On Fri Jan 30 10:38:45 2015, giles@godartbrown.co.uk wrote:
>>>>>>>>> It certainly works on Mac, but the technique you used to segment >>>>>>>>> the >>>>>>>>> pdf file appears to corrupt it and it cannot be read by the >>>>>>>>> recipient >>>>>>>>> :-( >>>>>>>>> >>>>>>>>> Giles >>>>>>>>> >>>>>>>>> On 30 Jan 2015, at 13:38, Juan Jose San Martin via RT <bug- >>>>>>>>> Email- >>>>>>>>> Send- >>>>>>>>> SMTP-Gmail@rt.cpan.org> wrote: >>>>>>>>>
>>>>>>>>>> <URL: https://rt.cpan.org/Ticket/Display.html?id=101832 > >>>>>>>>>> >>>>>>>>>> Hello, >>>>>>>>>> >>>>>>>>>> Thanks for this bug-report. >>>>>>>>>> >>>>>>>>>> I see that for some reason Google decided to change/adjust its >>>>>>>>>> SMTP >>>>>>>>>> server. >>>>>>>>>> Your sample code works on my Linux machine connecting to >>>>>>>>>> servers >>>>>>>>>> other than Gmail, but as you said, fails with it. >>>>>>>>>> >>>>>>>>>> The issue seems to be related on how the attachment is >>>>>>>>>> processed. >>>>>>>>>> I've changed the code so instead of sending the whole >>>>>>>>>> attachment >>>>>>>>>> file >>>>>>>>>> to the server, it sends it in several chunks. >>>>>>>>>> >>>>>>>>>> Based on my tests, now it works!, so please: >>>>>>>>>> >>>>>>>>>> Could you download the latest version from CPAN (I'm uploading >>>>>>>>>> 0.94) >>>>>>>>>> to give it a try? >>>>>>>>>> >>>>>>>>>> I really don't know why it works or not in Windows. Could you >>>>>>>>>> try >>>>>>>>>> the >>>>>>>>>> new release also in Windows? >>>>>>>>>> >>>>>>>>>> Hope this helps. >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> On Thu Jan 29 18:06:06 2015, giles@godartbrown.co.uk wrote:
>>>>>>>>>>> I have a min repro case that works fine on windows but throws >>>>>>>>>>> an >>>>>>>>>>> error >>>>>>>>>>> when run on Linux and Mac. I believe it is linked to bare >>>>>>>>>>> line >>>>>>>>>>> endings. >>>>>>>>>>> >>>>>>>>>>> This is the sample code; >>>>>>>>>>> <code> >>>>>>>>>>> use strict; >>>>>>>>>>> use warnings; >>>>>>>>>>> use Email::Send::SMTP::Gmail; >>>>>>>>>>> my $username = ‘user@gmail.com'; >>>>>>>>>>> my $password = ‘password'; >>>>>>>>>>> my $to = ‘recipient@somewher.com'; >>>>>>>>>>> my $from = 'user@gmail.com'; >>>>>>>>>>> my $subject = 'Test'; >>>>>>>>>>> my $attachment = “/pathtoapdffile/indata.pdf"; >>>>>>>>>>> my $thisLetter = "hello world <br> line 2"; >>>>>>>>>>> >>>>>>>>>>> my $mail = Email::Send::SMTP::Gmail->new( >>>>>>>>>>> -smtp => 'smtp.gmail.com', >>>>>>>>>>> -login => ‘user@gmail.com', >>>>>>>>>>> -pass => ‘password', >>>>>>>>>>> -layer => 'ssl', >>>>>>>>>>> -port => 465, >>>>>>>>>>> # -debug => 1, >>>>>>>>>>> ); >>>>>>>>>>> >>>>>>>>>>> $mail->send( >>>>>>>>>>> -to => $to, >>>>>>>>>>> -subject => $subject, >>>>>>>>>>> # -verbose => '1', >>>>>>>>>>> -contenttype=>'text/html', >>>>>>>>>>> -body => $thisLetter . '<br><br>', >>>>>>>>>>> -attachments => $attachment >>>>>>>>>>> ); >>>>>>>>>>> >>>>>>>>>>> $mail->bye; >>>>>>>>>>> </code> >>>>>>>>>>> >>>>>>>>>>> gives the following error on linux and Mac; >>>>>>>>>>> … >>>>>>>>>>> Net::SMTPS=GLOB(0x7fa89c0007c8)>>> CjI0NDI5CiUlRU9GCg== >>>>>>>>>>> Net::SMTPS: Net::Cmd::datasend(): unexpected EOF on command >>>>>>>>>>> channel: >>>>>>>>>>> at /Library/Perl/5.16/Email/Send/SMTP/Gmail.pm line 328. >>>>>>>>>>> >>>>>>>>>>> at the end of the pdf file. >>>>>>>>>>> I’m using Perl 5.16 and have Email::Send::SMTP::Gmail is up to >>>>>>>>>>> date >>>>>>>>>>> (0.88). >>>>>>>>>>> Have I missed anything? >>>>>>>>>>> >>>>>>>>>>> Thanks >>>>>>>>>>> Giles
>>>>>>>>>> >>>>>>>>>> >>>>>>>>>>
>>>>>>>> >>>>>>>> >>>>>>>>
>>>>>> >>>>>> >>>>>>
>>>> >>>> >>>>
>> >>
> > >