A customer requested a C# example that sends Korean email, so here is a very simple example:
PS> I saved my C# source file as "utf-8″ before cutting-and-pasting the Korean literal string. I’m not sure if that was necessary, but it seemed to be a wise thing to do. After all, if your .cs file is windows-1252, it can’t hardly handle non-Windows-1252 characters…
<font size=2 face=courier>
private void button18_Click(object sender, System.EventArgs e)
{
Chilkat.MailMan mm = new Chilkat.MailMan();
mm.UnlockComponent("30-day trial");
Chilkat.Email email = new Chilkat.Email();
email.AddTo("Matt","matt@chilkatsoft.com");
email.From = "Chilkat Support <support @chilkatsoft.com>";
// Cut-and-paste Korean text from:
// http://www.columbia.edu/kermit/utf8.html
email.Subject = "나는 유리를 먹을 수 있어요. 그래도 아프지 않아요";
email.Body = "나는 유리를 먹을 수 있어요. 그래도 아프지 않아요";
mm.SmtpHost = "smtp.myserver.net";
// Chilkat automatically recognizes that the characters
// are Korean, and encodes it using the ks_c_5601-1987 charset.
bool success = mm.SendEmail(email);
if (!success)
{
MessageBox.Show(mm.LastErrorText);
}
}
</support></font>