Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: kidronariel [...] gmail.com
Cc:
AdminCc:

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



Subject: Bug Report - truncated message
Date: Sun, 30 Jun 2013 15:48:04 +0300
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: אריאל קלגסבלד Ariel Klagsbald <kidronariel [...] gmail.com>
Conside this: use Email::Send::SMTP::Gmail; my $m = Email::Send::SMTP::Gmail->new (-smtp=>'smtp.gmail.com', -login=>$login, -pass=>$pass); $m->send(-bcc => $bcc, -subject => $subj, -replyto => $rt, -body => $body); $m->bye; $bcc is a comma-separated list of about 4 addresses. $subj is a utf-8 string of avout 36 chars. $rt is a regular address. $body is something like $body = (1+$max)."\n$name\n$desc\n$auth"); Each of is components (except the number) is a utf-8 string, possible more than one line, and possible empty. The bug is: when the mail is sent, the body is truncated. The is, only half of $auth is sent. I think it's related to the size of the body (or maybe the overall message) - the message seems to be truncated when it's too big. Months ago, I had a similar problem when attaching files. Sometimes the attached file appeared concatenated to be body (which made it useless, as its was a binary file), and part of the body (before the attached file) was truncated. I couldn't reproduce the problem exactly (it behaved differently each time), but I got the feeling that it has to do with too long utf-8 subject/body. CentOS (compatible to RedHat 5.5). Perl 5.8.8. Version of Email::Send::SMTP::Gmail is 0.24 Thanks a lot!
Hello. Thank you for bug-reporting. I'm able to reproduce your issue (subject or body truncated) when the perl script mixes UTF-8 and non-UTF strings. I'm attaching an example that works... but if you add "use utf-8;", then it fails. Please, verify you are not mixing encodings. Also, I recommend you to upgrade to the latest version (0.44) Thanks! On Sun Jun 30 08:48:18 2013, kidronariel@gmail.com wrote: Show quoted text
> Conside this: > > use Email::Send::SMTP::Gmail; > my $m = Email::Send::SMTP::Gmail->new (-smtp=>'smtp.gmail.com', > -login=>$login, > -pass=>$pass); > $m->send(-bcc => $bcc, > -subject => $subj, > -replyto => $rt, > -body => $body); > $m->bye; > > $bcc is a comma-separated list of about 4 addresses. $subj is a utf-8 > string of avout 36 chars. $rt is a regular address. $body is something like > > $body = (1+$max)."\n$name\n$desc\n$auth"); > > Each of is components (except the number) is a utf-8 string, possible more > than one line, and possible empty. > > The bug is: when the mail is sent, the body is truncated. The is, only half > of $auth is sent. I think it's related to the size of the body (or maybe > the overall message) - the message seems to be truncated when it's too big. > > Months ago, I had a similar problem when attaching files. Sometimes the > attached file appeared concatenated to be body (which made it useless, as > its was a binary file), and part of the body (before the attached file) was > truncated. I couldn't reproduce the problem exactly (it behaved differently > each time), but I got the feeling that it has to do with too long utf-8 > subject/body. > > CentOS (compatible to RedHat 5.5). Perl 5.8.8. Version of > Email::Send::SMTP::Gmail is 0.24 > > Thanks a lot!
Subject: sample.pl
#!/usr/bin/perl use Email::Send::SMTP::Gmai; # use utf-8; # to see the issue my $mail=Email::Send::SMTP::Gmail->new(-login=>'xxxxx',-pass=>'yyyy',-contenttype=>'text/html'); my $subject='Тестирование по русскому с примера на другой язык и алфавит символов восточного'; my $body='Тестирование по русскому с примера на другой язык и алфавит символов восточного<br>Тестирование по русскому с примера на другой язык и алфавит символов восточного'; my $name='название'; my $desc='описание'; my $auth='разрешение разрешение разрешение'; $body.="\n$name\n$desc\n$auth"; $mail->send(-to=>'aaaaaaaaaa',-from=>'xxxxxxxxx',-subject=>$subject,-verbose=>'1',-body=>$body,-contenttype=>'text/html'); $mail->bye;
Subject: Re: [rt.cpan.org #86571] AutoReply: Bug Report - truncated message
Date: Tue, 2 Jul 2013 14:02:15 +0300
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: אריאל קלגסבלד Ariel Klagsbald <kidronariel [...] gmail.com>
I've upgraded to 0.44, and there doesn't seem to be any change. I don't use 'use utf-8'. Nor do I have much control over the strings - I get them as input (from an email, usually) and simply output them to another email (and to a local file, if that matters). $body is mixed, as the number is a number, and the rest of its components can safely be assumed to have utf-8 chars (maybe entirely utf-8). I can't help it. Any solution? 2013/6/30 Bugs in Email-Send-SMTP-Gmail via RT < bug-Email-Send-SMTP-Gmail@rt.cpan.org> Show quoted text
> > Greetings, > > This message has been automatically generated in response to the > creation of a trouble ticket regarding: > "Bug Report - truncated message", > a summary of which appears below. > > There is no need to reply to this message right now. Your ticket has been > assigned an ID of [rt.cpan.org #86571]. Your ticket is accessible > on the web at: > > https://rt.cpan.org/Ticket/Display.html?id=86571 > > Please include the string: > > [rt.cpan.org #86571] > > in the subject line of all future correspondence about this issue. To do > so, > you may reply to this message. > > Thank you, > bug-Email-Send-SMTP-Gmail@rt.cpan.org > > ------------------------------------------------------------------------- > Conside this: > > use Email::Send::SMTP::Gmail; > my $m = Email::Send::SMTP::Gmail->new (-smtp=>'smtp.gmail.com', > -login=>$login, > -pass=>$pass); > $m->send(-bcc => $bcc, > -subject => $subj, > -replyto => $rt, > -body => $body); > $m->bye; > > $bcc is a comma-separated list of about 4 addresses. $subj is a utf-8 > string of avout 36 chars. $rt is a regular address. $body is something like > > $body = (1+$max)."\n$name\n$desc\n$auth"); > > Each of is components (except the number) is a utf-8 string, possible more > than one line, and possible empty. > > The bug is: when the mail is sent, the body is truncated. The is, only half > of $auth is sent. I think it's related to the size of the body (or maybe > the overall message) - the message seems to be truncated when it's too big. > > Months ago, I had a similar problem when attaching files. Sometimes the > attached file appeared concatenated to be body (which made it useless, as > its was a binary file), and part of the body (before the attached file) was > truncated. I couldn't reproduce the problem exactly (it behaved differently > each time), but I got the feeling that it has to do with too long utf-8 > subject/body. > > CentOS (compatible to RedHat 5.5). Perl 5.8.8. Version of > Email::Send::SMTP::Gmail is 0.24 > > Thanks a lot! >
Hello. Please, upload an example that fails Thanks Peco On Tue Jul 02 07:02:33 2013, kidronariel@gmail.com wrote: Show quoted text
> I've upgraded to 0.44, and there doesn't seem to be any change. > > I don't use 'use utf-8'. Nor do I have much control over the strings - > I > get them as input (from an email, usually) and simply output them to > another email (and to a local file, if that matters). $body is mixed, > as > the number is a number, and the rest of its components can safely be > assumed to have utf-8 chars (maybe entirely utf-8). I can't help it. > > Any solution? > > > 2013/6/30 Bugs in Email-Send-SMTP-Gmail via RT < > bug-Email-Send-SMTP-Gmail@rt.cpan.org> >
> > > > Greetings, > > > > This message has been automatically generated in response to the > > creation of a trouble ticket regarding: > > "Bug Report - truncated message", > > a summary of which appears below. > > > > There is no need to reply to this message right now. Your ticket
> has been
> > assigned an ID of [rt.cpan.org #86571]. Your ticket is accessible > > on the web at: > > > > https://rt.cpan.org/Ticket/Display.html?id=86571 > > > > Please include the string: > > > > [rt.cpan.org #86571] > > > > in the subject line of all future correspondence about this issue.
> To do
> > so, > > you may reply to this message. > > > > Thank you, > > bug-Email-Send-SMTP-Gmail@rt.cpan.org > > > >
> -------------------------------------------------------------------------
> > Conside this: > > > > use Email::Send::SMTP::Gmail; > > my $m = Email::Send::SMTP::Gmail->new (-smtp=>'smtp.gmail.com', > > -login=>$login, > > -pass=>$pass); > > $m->send(-bcc => $bcc, > > -subject => $subj, > > -replyto => $rt, > > -body => $body); > > $m->bye; > > > > $bcc is a comma-separated list of about 4 addresses. $subj is a utf-
> 8
> > string of avout 36 chars. $rt is a regular address. $body is
> something like
> > > > $body = (1+$max)."\n$name\n$desc\n$auth"); > > > > Each of is components (except the number) is a utf-8 string,
> possible more
> > than one line, and possible empty. > > > > The bug is: when the mail is sent, the body is truncated. The is,
> only half
> > of $auth is sent. I think it's related to the size of the body (or
> maybe
> > the overall message) - the message seems to be truncated when it's
> too big.
> > > > Months ago, I had a similar problem when attaching files. Sometimes
> the
> > attached file appeared concatenated to be body (which made it
> useless, as
> > its was a binary file), and part of the body (before the attached
> file) was
> > truncated. I couldn't reproduce the problem exactly (it behaved
> differently
> > each time), but I got the feeling that it has to do with too long
> utf-8
> > subject/body. > > > > CentOS (compatible to RedHat 5.5). Perl 5.8.8. Version of > > Email::Send::SMTP::Gmail is 0.24 > > > > Thanks a lot! > >
Subject: [rt.cpan.org #86571]
Date: Thu, 4 Jul 2013 14:17:02 +0300
To: bug-Email-Send-SMTP-Gmail [...] rt.cpan.org
From: אריאל קלגסבלד Ariel Klagsbald <kidronariel [...] gmail.com>
Thanks again for your time and efforts. Attached is a truncated version of my script. It can give you an idea of what I'm doing. Basically I get an email - it has an attached file, and its body contains description of this file (name, author etc.). I save the file locally, and then send email to some repicients, telling them I have a new file, and include its description. Hope that helps. And again, Thank you very much.

Message body is not shown because sender requested not to inline it.

Sorry for the delay in replying. I could not work on it so far. Well, better late than never: I was able to reproduce the error. Is now fixed. A new release will be uploaded to CPAN today (v0.56) Thanks! El Jue Jul 04 07:17:20 2013, kidronariel@gmail.com escribió: Show quoted text
> Thanks again for your time and efforts. > > Attached is a truncated version of my script. It can give you an idea of > what I'm doing. Basically I get an email - it has an attached file, and its > body contains description of this file (name, author etc.). I save the file > locally, and then send email to some repicients, telling them I have a new > file, and include its description. Hope that helps. > > And again, Thank you very much.