August 2006 Archives
Took me a while to figure this one out, but it turns out to be very simple: just make sure you have charset=utf-8 set in the Type argument you pass to your new $msg object and Japanese characters appear fine in the received email.
For example, a simple plain text message:
For example, a simple plain text message:
$msg = MIME::Lite->new(Making sure you have the charset defined appears to solve the problem (and you can do that on HTML and multpart messages). If you are sending HTML, make sure the meta http-equiv="content-type" tag in the document head is also set to UTF-8 as well to stop email clients from gettingconfused by which content type to use.
From => $from,
To => $to,
Reply-to => $from,
Subject => $subject,
Type => 'text/plain; charset=utf-8',
Data => $textmessage,
);
