Zip Component, Email Component, Encryption Component ActiveX Control for Zip Compression .NET Components for ASP.NET
ActiveX and .NET Components for Zip Compression, Encryption, Email, XML, S/MIME, HTML Email, Character Encoding, Digital Certificates, FTP, and more ASP Email ActiveX Component

Index of Chilkat Blog Posts

October 6, 2005

Some email clients suck.

Quoted-printable and base64-encoding is standard with email, yet some email clients are still not so polished when it comes to decoding and displaying. Do you ever get emails where the From or Subject contains something like this:

From: =?koi8-r?B?98nQ9MHKzSDrzNXC?=


From: =?iso-8859-1?Q?l=E5ngt?=

Sometimes the email client will display these lines undecoded in the summary listing (where you see one line per email), but if you double-click on the email to show that single email in a window, you see the foreign language characters decoded and rendered properly.

Most good email clients do not have this problem…

You can send the email using 8bit encoding for a header field by calling mailman.RenderToMime followed by mailman.SendMime. Here is a VB6 example:

Dim mailman As New ChilkatMailMan2
mailman.UnlockComponent "test"

Dim email As New ChilkatEmail2

email.Subject = "långt"
email.FromName = "_FROM_NAME_"
email.FromAddress = ""

email.AddTo "långt", ""
email.Body = "långt"

Dim mimeTxt As String
mimeTxt = mailman.RenderToMime(email)
mimeTxt = Replace(mimeTxt, "_FROM_NAME_", "långt")

mailman.SmtpHost = ""
mailman.SendMime "", "", mimeTxt

When building the email, use marker strings that will be replaced after
rendering the MIME. In this case "_FROM_NAME_" is replaced with the 8-bit string "långt" to avoid the Q-encoding in that header field. You can do the same with the other header fields if necessary.

Privacy Statement. Copyright 2000-2011 Chilkat Software, Inc. All rights reserved.
Send feedback to

Components for Microsoft Windows XP, 2000, 2003 Server, Vista, Windows 7, and Windows 95/98/NT4.