Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: email [...] gaetanlord.ca
Cc:
AdminCc:

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



Subject: Strange behavior with multiple files attachment
Date: Wed, 6 Jan 2016 22:05:47 -0500
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Gaetan Lord <email [...] gaetanlord.ca>
Hi Not sure if this is part of the multipart email protocol but I experience an issue that need at least some clarification. I have a perl script producing pdf files (4), and I use Email::Send::SMTP::Gmail attachment to send them in a single email. Perl version 5.20.2 Email::Send::SMTP::Gmail Version 0.99 When I send the files to a gmail account, everything looks good and I see only 4 pdf files attachment But some of the recipients are not using gmail or yahoo. They get their email from providers, and thier email contain other attachement files. Those are actually empty files, with a mime type of text/plain. Look like gmail is striping empty file attachment. I try both way to send attachement and they both behave the same Is there any way to remove those plain text files, because some recipient can't see the PDF files, the plain text file seem to interact with the pdf output. Thank for any help This is the list of attachment the email get I 1 <no description> [text/html, 7bit, utf-8, 3.5K] A 2 galmond_card_carte.pdf [applica/pdf, base64, 631K] I 3 <no description> [text/plain, 7bit, us-ascii, 0K] A 4 galmond_letter_lettre.pdf [applica/pdf, base64, 84K] I 5 <no description> [text/plain, 7bit, us-ascii, 0K] A 6 galmond_business_card.pdf [applica/pdf, base64, 72K] I 7 <no description> [text/plain, 7bit, us-ascii, 0K] A 8 galmond_carte_affaire.pdf [applica/pdf, base64, 72K] I 9 <no description> [text/plain, 7bit, us-ascii, 0K] This is the content of the email where you could see the text/plain section of the multipart email 11613 NGVkYmJjNWVjYzRjNDNkPiA8ZGM2NTQ5NTExYmFlNGViYzY2YmM2YWY1NmQ4YmYyYjQ2MDYxYjAw 11614 NjcxN2U2N2UyYzRlZGJiYzVlY2M0YzQzZD5dCj4+CnN0YXJ0eHJlZgo1NDUzNQolJUVPRgo= 11615 11616 --This-is-a-mail-boundary-8217539 11617 Content-Type: text/plain 11618 11619 11620 --This-is-a-mail-boundary-8217539-- 11621 -- Gaetan Lord->
On Wed Jan 06 22:06:31 2016, email@gaetanlord.ca wrote: Show quoted text
> Hi > > Not sure if this is part of the multipart email protocol but I experience > an issue that need at least some clarification. > > I have a perl script producing pdf files (4), and I > use Email::Send::SMTP::Gmail attachment to send them in a single email. > > Perl version 5.20.2 > Email::Send::SMTP::Gmail Version 0.99 > > When I send the files to a gmail account, everything looks good and I see > only 4 pdf files attachment > But some of the recipients are not using gmail or yahoo. They get their > email from providers, and thier email contain other attachement files. > Those are actually empty files, with a mime type of text/plain. Look like > gmail is striping empty file attachment. > > I try both way to send attachement and they both behave the same > > Is there any way to remove those plain text files, because some recipient > can't see the PDF files, the plain text file seem to interact with the pdf > output. > > Thank for any help > > > This is the list of attachment the email get > > I 1 <no description> [text/html, > 7bit, utf-8, 3.5K] > A 2 galmond_card_carte.pdf > [applica/pdf, base64, 631K] > I 3 <no description> > [text/plain, 7bit, us-ascii, 0K] > A 4 galmond_letter_lettre.pdf > [applica/pdf, base64, 84K] > I 5 <no description> > [text/plain, 7bit, us-ascii, 0K] > A 6 galmond_business_card.pdf > [applica/pdf, base64, 72K] > I 7 <no description> > [text/plain, 7bit, us-ascii, 0K] > A 8 galmond_carte_affaire.pdf > [applica/pdf, base64, 72K] > I 9 <no description> > [text/plain, 7bit, us-ascii, 0K] > > > This is the content of the email where you could see the text/plain section > of the multipart email > > 11613 > NGVkYmJjNWVjYzRjNDNkPiA8ZGM2NTQ5NTExYmFlNGViYzY2YmM2YWY1NmQ4YmYyYjQ2MDYxYjAw > 11614 > NjcxN2U2N2UyYzRlZGJiYzVlY2M0YzQzZD5dCj4+CnN0YXJ0eHJlZgo1NDUzNQolJUVPRgo= > 11615 > 11616 --This-is-a-mail-boundary-8217539 > 11617 Content-Type: text/plain > 11618 > 11619 > 11620 --This-is-a-mail-boundary-8217539-- > 11621 > > > >
Hello, Thank you for this bug-report. Please, let me know how you're handling the attachment arguments? Hashref (-attachmentlist) or a list separated by commas (-attachments)? If it's possible, try to use -attachmentlist to check if the error persists. my $att; $att->[0]->{file}='/full_path/file.pdf'; $att->[1]->{file}='/full_path/file1.pdf'; $mail->send(-to=>'target@xxx.com', -subject=>'Hello!', -body=>'Just testing it<br>Bye!', -contenttype=>'text/html', -attachmentlist=>$att); $mail->bye;
Subject: Re: [rt.cpan.org #110966] Strange behavior with multiple files attachment
Date: Thu, 7 Jan 2016 09:42:53 -0500
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: Gaetan Lord <email [...] gaetanlord.ca>
Hi Juan Thank for the reply As I mention I tried both possible way to do it. I include the relevant piece of code Commented line 512 and 538 are the initial way I did it, 512 #my $attachment = "Card/$Data{'username'}_card_carte.pdf,Letter/$Data{'username'}_letter_lettre.pdf,BusinessCard/$Data{'username'}_business_card.pdf,BusinessCard/$Data{'username'}_carte_affaire.pdf"; 513 my $attachment; 514 $attachment->[0]->{file} = "Card/$Data{'username'}_card_carte.pdf"; 515 $attachment->[1]->{file} = "Letter/$Data{'username'}_letter_lettre.pdf"; 516 $attachment->[2]->{file} = "BusinessCard/$Data{'username'}_business_card.pdf"; 517 $attachment->[3]->{file} = "BusinessCard/$Data{'username'}_carte_affaire.pdf"; 518 519 520 my $mail = Email::Send::SMTP::Gmail->new( 521 -smtp => 'smtp.gmail.com', 522 -login => 'office@###', 523 -debug => 0, 524 -layer => 'ssl', 525 -pass => '###' 526 ); 527 528 my $RC = $mail->send( 529 -to => "$to", 530 -subject => "$subject", 531 -verbose => '0', 532 -charset => 'utf-8', 533 -contenttype => 'text/html', 534 -body => $message, 535 -attachmentlist=> $attachment 536 ) if !$DontSendEmail; 537 538 #-attachments => $attachment, 539 540 541 $mail->bye; On Thu, Jan 7, 2016 at 4:59 AM, 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=110966 > > > On Wed Jan 06 22:06:31 2016, email@gaetanlord.ca wrote:
> > Hi > > > > Not sure if this is part of the multipart email protocol but I experience > > an issue that need at least some clarification. > > > > I have a perl script producing pdf files (4), and I > > use Email::Send::SMTP::Gmail attachment to send them in a single email. > > > > Perl version 5.20.2 > > Email::Send::SMTP::Gmail Version 0.99 > > > > When I send the files to a gmail account, everything looks good and I see > > only 4 pdf files attachment > > But some of the recipients are not using gmail or yahoo. They get their > > email from providers, and thier email contain other attachement files. > > Those are actually empty files, with a mime type of text/plain. Look like > > gmail is striping empty file attachment. > > > > I try both way to send attachement and they both behave the same > > > > Is there any way to remove those plain text files, because some recipient > > can't see the PDF files, the plain text file seem to interact with the
> pdf
> > output. > > > > Thank for any help > > > > > > This is the list of attachment the email get > > > > I 1 <no description>
> [text/html,
> > 7bit, utf-8, 3.5K] > > A 2 galmond_card_carte.pdf > > [applica/pdf, base64, 631K] > > I 3 <no description> > > [text/plain, 7bit, us-ascii, 0K] > > A 4 galmond_letter_lettre.pdf > > [applica/pdf, base64, 84K] > > I 5 <no description> > > [text/plain, 7bit, us-ascii, 0K] > > A 6 galmond_business_card.pdf > > [applica/pdf, base64, 72K] > > I 7 <no description> > > [text/plain, 7bit, us-ascii, 0K] > > A 8 galmond_carte_affaire.pdf > > [applica/pdf, base64, 72K] > > I 9 <no description> > > [text/plain, 7bit, us-ascii, 0K] > > > > > > This is the content of the email where you could see the text/plain
> section
> > of the multipart email > > > > 11613 > >
> NGVkYmJjNWVjYzRjNDNkPiA8ZGM2NTQ5NTExYmFlNGViYzY2YmM2YWY1NmQ4YmYyYjQ2MDYxYjAw
> > 11614 > > NjcxN2U2N2UyYzRlZGJiYzVlY2M0YzQzZD5dCj4+CnN0YXJ0eHJlZgo1NDUzNQolJUVPRgo= > > 11615 > > 11616 --This-is-a-mail-boundary-8217539 > > 11617 Content-Type: text/plain > > 11618 > > 11619 > > 11620 --This-is-a-mail-boundary-8217539-- > > 11621 > > > > > > > >
> > Hello, > > Thank you for this bug-report. > > Please, let me know how you're handling the attachment arguments? Hashref > (-attachmentlist) or a list separated by commas (-attachments)? > > If it's possible, try to use -attachmentlist to check if the error > persists. > > my $att; > $att->[0]->{file}='/full_path/file.pdf'; > $att->[1]->{file}='/full_path/file1.pdf'; > > $mail->send(-to=>'target@xxx.com', -subject=>'Hello!', > -body=>'Just testing it<br>Bye!', > -contenttype=>'text/html', > -attachmentlist=>$att); > $mail->bye; > > > >
-- Gaetan Lord
Thanks for your reporting New release 1.01 should fix this issue. On Thu Jan 07 09:43:38 2016, email@gaetanlord.ca wrote: Show quoted text
> Hi Juan > > Thank for the reply > > As I mention I tried both possible way to do it. > I include the relevant piece of code > > Commented line 512 and 538 are the initial way I did it, > > > 512 #my $attachment = > "Card/$Data{'username'}_card_carte.pdf,Letter/$Data{'username'}_letter_lettre.pdf,BusinessCard/$Data{'username'}_business_card.pdf,BusinessCard/$Data{'username'}_carte_affaire.pdf"; > > 513 my $attachment; > 514 $attachment->[0]->{file} = > "Card/$Data{'username'}_card_carte.pdf"; > 515 $attachment->[1]->{file} = > "Letter/$Data{'username'}_letter_lettre.pdf"; > 516 $attachment->[2]->{file} = > "BusinessCard/$Data{'username'}_business_card.pdf"; > 517 $attachment->[3]->{file} = > "BusinessCard/$Data{'username'}_carte_affaire.pdf"; > 518 > 519 > 520 my $mail = Email::Send::SMTP::Gmail->new( > 521 -smtp => 'smtp.gmail.com', > 522 -login => 'office@###', > 523 -debug => 0, > 524 -layer => 'ssl', > 525 -pass => '###' > 526 ); > 527 > 528 my $RC = $mail->send( > 529 -to => "$to", > 530 -subject => "$subject", > 531 -verbose => '0', > 532 -charset => 'utf-8', > 533 -contenttype => 'text/html', > 534 -body => $message, > 535 -attachmentlist=> $attachment > 536 ) if !$DontSendEmail; > 537 > 538 #-attachments => $attachment, > 539 > 540 > 541 $mail->bye; > > > > > > > On Thu, Jan 7, 2016 at 4:59 AM, Juan Jose San Martin via RT < > bug-Email-Send-SMTP-Gmail@rt.cpan.org> wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=110966 > > > > > On Wed Jan 06 22:06:31 2016, email@gaetanlord.ca wrote:
> > > Hi > > > > > > Not sure if this is part of the multipart email protocol but I > > > experience > > > an issue that need at least some clarification. > > > > > > I have a perl script producing pdf files (4), and I > > > use Email::Send::SMTP::Gmail attachment to send them in a single > > > email. > > > > > > Perl version 5.20.2 > > > Email::Send::SMTP::Gmail Version 0.99 > > > > > > When I send the files to a gmail account, everything looks good and > > > I see > > > only 4 pdf files attachment > > > But some of the recipients are not using gmail or yahoo. They get > > > their > > > email from providers, and thier email contain other attachement > > > files. > > > Those are actually empty files, with a mime type of text/plain. > > > Look like > > > gmail is striping empty file attachment. > > > > > > I try both way to send attachement and they both behave the same > > > > > > Is there any way to remove those plain text files, because some > > > recipient > > > can't see the PDF files, the plain text file seem to interact with > > > the
> > pdf
> > > output. > > > > > > Thank for any help > > > > > > > > > This is the list of attachment the email get > > > > > > I 1 <no description>
> > [text/html,
> > > 7bit, utf-8, 3.5K] > > > A 2 galmond_card_carte.pdf > > > [applica/pdf, base64, 631K] > > > I 3 <no description> > > > [text/plain, 7bit, us-ascii, 0K] > > > A 4 galmond_letter_lettre.pdf > > > [applica/pdf, base64, 84K] > > > I 5 <no description> > > > [text/plain, 7bit, us-ascii, 0K] > > > A 6 galmond_business_card.pdf > > > [applica/pdf, base64, 72K] > > > I 7 <no description> > > > [text/plain, 7bit, us-ascii, 0K] > > > A 8 galmond_carte_affaire.pdf > > > [applica/pdf, base64, 72K] > > > I 9 <no description> > > > [text/plain, 7bit, us-ascii, 0K] > > > > > > > > > This is the content of the email where you could see the text/plain
> > section
> > > of the multipart email > > > > > > 11613 > > >
> > NGVkYmJjNWVjYzRjNDNkPiA8ZGM2NTQ5NTExYmFlNGViYzY2YmM2YWY1NmQ4YmYyYjQ2MDYxYjAw
> > > 11614 > > > NjcxN2U2N2UyYzRlZGJiYzVlY2M0YzQzZD5dCj4+CnN0YXJ0eHJlZgo1NDUzNQolJUVPRgo= > > > 11615 > > > 11616 --This-is-a-mail-boundary-8217539 > > > 11617 Content-Type: text/plain > > > 11618 > > > 11619 > > > 11620 --This-is-a-mail-boundary-8217539-- > > > 11621 > > > > > > > > > > > >
> > > > Hello, > > > > Thank you for this bug-report. > > > > Please, let me know how you're handling the attachment arguments? > > Hashref > > (-attachmentlist) or a list separated by commas (-attachments)? > > > > If it's possible, try to use -attachmentlist to check if the error > > persists. > > > > my $att; > > $att->[0]->{file}='/full_path/file.pdf'; > > $att->[1]->{file}='/full_path/file1.pdf'; > > > > $mail->send(-to=>'target@xxx.com', -subject=>'Hello!', > > -body=>'Just testing it<br>Bye!', > > -contenttype=>'text/html', > > -attachmentlist=>$att); > > $mail->bye; > > > > > > > >
Resolved