Re: sending chinese character emails via Net::SMTP using Mime-tools

From: James O'Brien (jobrien_at_techtarget.com)
Date: 03/08/04


Date: 8 Mar 2004 11:05:27 -0800


> I'd suspect that a robust way of sending UTF8 content is to use a
> content transfer encoding of base64 and a content type of 'text/plain;
> charset=utf-8' but I can't find any references to that online so it may
> not be correct. But if anyone here know I'd certainly be interested in
> finding the correct way.
>
> P

I received the following answer from another group (comp.mail.misc)
writes:

Correct. Don't forget to insert the "Mime-Version: 1.0" and
"Content-Type:
text/plain; charset=utf-8" headers.

If your SMTP server advertizes "8BITMIME", don't even bother with
quoted-printable (unless it's Qmail). Just use
"Content-Transfer-Encoding:
8bit", and forget the whole thing.

You might run into a mail client that doesn't grok utf-8. In that
case, you
will need to transcode your content to big-5 or gb2312 (or something
similar), and adjust the headers accordingly.

====
The part that worries me is the last paragraph. Judging from that and
other stuff I've read (since I might be dealing with a variety of
clients/mail servers), I might want to use gb2312(the windows
simplified chinese) and quoted-printable or base64 - like you said.
Not sure which is preferrable. base64 seems more standard.
The Mime::Tools and maybe even Mime::Lite (I assume) will handle the
encoding.
I'll keep you posted.



Relevant Pages

  • Re: [opensuse] Test - Do Not Respond
    ... option is configured in the Accounts section's Receiving tab for the ... fetched messages on server" check-box. ... So I can't set it to only read headers that contain opensuse.org? ... reading mail locally with mail client. ...
    (SuSE)
  • Re: [SLE] unsusbcribe process
    ... reading and the supressing the headers (The bits that HEAD the email ... This isn't about defining what mail client a person uses or should use. ... headers-based process to punish all UIMCs (Users of Inferior Mail ...
    (SuSE)
  • Re: FC11 , Deleting Dragon-Player
    ... But when I click on a attached wmv file VLC won't play ... I have to "save As",then play them from my home with VLC. ... the mail client doesn't identify the ... Have a look at the message source, and see what headers are there just ...
    (Fedora)
  • Re: EXIM - append advert - and UK legal disclosure requirement
    ... Would just adding the company registration and address to the headers suffice, ... However the Organization header on my email is there ... don't in fact use them as the same mail client is used for both Red Hat ... good for this sort of mail reworking. ...
    (Fedora)
  • Re: JavaMail and base64 problem
    ... Base64 expects you to pad to a multiple of 4 with = ... message (headers and all) from the InputStream and parses them. ... and, if so, find the right placeto add the padding into the stream. ... MimeMessage constructor to handle, since its already parsing the input ...
    (comp.lang.java.programmer)