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: 47111
Status: resolved
Priority: 0/
Queue: Email-Sender

People
Owner: Nobody in particular
Requestors: daxim [...] cpan.org
Cc:
AdminCc:

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



Subject: not unicode safe?
When running this program: use utf8; use Email::Simple qw(); use Email::Simple::Creator qw(); use Email::Sender::Simple qw(sendmail); use Email::Sender::Transport::Mbox qw(); my $email = Email::Simple->create( header => [ To => 'daxim@localhost', From => 'daxim@localhost', Subject => '☺', ], body => '☺', ); sendmail($email, {transport => Email::Sender::Transport::Mbox->new()}); ... the following warning is printed: Wide character in print at /home/daxim/local/lib/perl5/5.10.0/x86_64-linux-thread-multi-ld/IO/Handle.pm line 406. The resulting mbox looks like this: From daxim@localhost Thu Jun 18 16:32:25 2009 To: daxim@localhost From: daxim@localhost Subject: ☺ Date: Thu, 18 Jun 2009 16:32:25 +0200 ☺ Looks like data is passed through unencoded, and the result is not much standard conform. I expected the mail to have headers like these: Subject: =?utf-8?B?4pi6?= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Do I have to do the encoding and header handling on my own?
Email::Sender only looks at your message as a payload, it does not inspect it unless you use ::Simple, in which case it's just looking for addresses. Use Email::MIME, and the (recently added) header_str and body_str options to make encoding more transparent. -- rjbs