Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-Sender CPAN distribution.

Report information
The Basics
Id: 70462
Status: rejected
Priority: 0/
Queue: Email-Sender

People
Owner: Nobody in particular
Requestors: dean [...] fragfest.com.au
Cc:
AdminCc:

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



Subject: Email::Sender::Transport::SMTP mutilates $from
It you try to send an email where 'from' is of the format q|First Last <first@domain.com>| or q|"First Last" <first@domain.com>| Then it will be mutilated in to q|"First Last <first"@domain.com>| or q|""First Last" <first"@domain.com>| respectively. this is happening in the _quoteaddr function, which is trying to work around strange looking localparts?
Subject: Re: [rt.cpan.org #70462] Email::Sender::Transport::SMTP mutilates $from
Date: Wed, 24 Aug 2011 09:30:29 -0400
To: Dean Hamstead via RT <bug-Email-Sender [...] rt.cpan.org>
From: Ricardo Signes <rjbs [...] cpan.org>
* Dean Hamstead via RT <bug-Email-Sender@rt.cpan.org> [2011-08-24T09:27:15] Show quoted text
> > q|First Last <first@domain.com>|
That is a header-style mailbox specification. You need to pass an envelope recipient. { to => [ 'first@domain.com' ], from => ... } Please let me know if this resolves your problem. -- rjbs
Subject: Re: [rt.cpan.org #70462] Email::Sender::Transport::SMTP mutilates $from
Date: Wed, 24 Aug 2011 23:50:48 +1000
To: bug-Email-Sender [...] rt.cpan.org
From: Dean Hamstead <dean [...] fragfest.com.au>
would you be kind email to add something like?... $from =~ s/^.*<//; $from =~ s/>.*$//; On 24/08/11 23:31, Ricardo Signes via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=70462 > > > * Dean Hamstead via RT <bug-Email-Sender@rt.cpan.org> [2011-08-24T09:27:15]
>> >> q|First Last <first@domain.com>|
> > That is a header-style mailbox specification. > > You need to pass an envelope recipient. > > { to => [ 'first@domain.com' ], from => ... } > > Please let me know if this resolves your problem. >
Subject: Re: [rt.cpan.org #70462] Email::Sender::Transport::SMTP mutilates $from
Date: Wed, 24 Aug 2011 10:06:43 -0400
To: Dean Hamstead via RT <bug-Email-Sender [...] rt.cpan.org>
From: Ricardo Signes <rjbs [...] cpan.org>
* Dean Hamstead via RT <bug-Email-Sender@rt.cpan.org> [2011-08-24T09:51:06] Show quoted text
> would you be kind email to add something like?... > > $from =~ s/^.*<//; > $from =~ s/>.*$//;
No, that would be guaranteed to be wrong in some cases. For example: "<John> <Smith>"@example.com ...which is a valid email address. I would rather not guess as to what kind of input I was given, and just assume I was given input of the type expected. If you use Email::Sender::Simple, it will parse the "to" header, pull out only the address, and set the envelope recipient correctly. -- rjbs
Subject: Re: [rt.cpan.org #70462] Email::Sender::Transport::SMTP mutilates $from
Date: Fri, 26 Aug 2011 23:21:22 +1000
To: bug-Email-Sender [...] rt.cpan.org
From: Dean Hamstead <dean [...] fragfest.com.au>
ahh ok, fair enough i was following the example in http://search.cpan.org/~rjbs/Email-Sender-0.110001/lib/Email/Sender.pm which wants me to have a from in the arguments hash, however the quickstart http://search.cpan.org/~rjbs/Email-Sender-0.110001/lib/Email/Sender/Manual/QuickStart.pm shows that its not needed. thanks for you feedback, much appreciated. please close this as invalid On 25/08/11 00:08, Ricardo Signes via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=70462 > > > * Dean Hamstead via RT <bug-Email-Sender@rt.cpan.org> [2011-08-24T09:51:06]
>> would you be kind email to add something like?... >> >> $from =~ s/^.*<//; >> $from =~ s/>.*$//;
> > No, that would be guaranteed to be wrong in some cases. For example: > > "<John> <Smith>"@example.com > > ...which is a valid email address. > > I would rather not guess as to what kind of input I was given, and just assume > I was given input of the type expected. > > If you use Email::Sender::Simple, it will parse the "to" header, pull out only > the address, and set the envelope recipient correctly. >
closed as requested -- rjbs