in reply to Email Subject with Icon

G'day perlpearls,

Welcome to the monastery.

I agree with derby's comments above. I was interested to see how this might be achieved with MIME::Lite so I ran some tests. Having now seen your subsequent response, I realise that this isn't what you were after; however, someone might find it useful.

Here's my test code:

$ perl -Mstrict -Mwarnings -e ' use utf8; use MIME::Lite; package MIME::Lite::IO_Handle { no warnings "redefine"; sub print { my $self = shift; binmode $$self => ":utf8"; print {$$self} @_; } }; MIME::Lite::->new( To => "ken", From => "ken", Type => "text/plain; charset=utf8", Subject => "\x{263a} Happy days!", Data => "Testing 1 2 3", )->send; '

Notes:

Here's the mail that arrived:

$ mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/ken": 1 message 1 new
>N  1 ken@ganymede.localho  Thu Jun  6 11:21  19/638   "☺ Happy days!"
?
Message 1:
From ken@ganymede.localhost  Thu Jun  6 11:21:44 2013
X-Original-To: ken
Delivered-To: ken@ganymede.localhost
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=utf8
MIME-Version: 1.0
X-Mailer: MIME::Lite 3.029 (F2.84; T1.38; A2.12; B3.13; Q3.13)
Date: Thu, 6 Jun 2013 11:21:44 +1000
To: ken@ganymede.localhost
From: ken@ganymede.localhost
Subject: ☺ Happy days!

Testing 1 2 3

? 

-- Ken