Chilkat HOME ASP Visual Basic VB.NET C# Visual C++ C MFC Delphi FoxPro Java Perl PHP Python Ruby SQL Server VBScript
Send Korean Email
Delphi sample program that sends an email using Korean characters in the subject and body. // This example program sends an email with Korean characters. procedure TForm1.Button20Click(Sender: TObject); var email: IChilkatEmail2; ok: Integer; koreanChars : WideString; begin // A ChilkatMailMan2 ActiveX component was dropped onto the Delphi // form, and this became the Form's member variable "ChilkatMailMan21". ChilkatMailMan21.UnlockComponent('Anything for 30-day trial'); ChilkatMailMan21.SmtpHost := 'smtp.comcast.net'; email := ChilkatMailMan21.NewEmail(); // We cannot add a literal string containing Korean characters // to our Delphi source code, so instead we load a file containing // Korean characters in the utf-8 encoding. // The sample txt file can be downloaded from: // http://www.chilkatsoft.com/testData/koreanSample.txt koreanChars := email.LoadTextFileToUnicode('koreanSample.txt','utf-8'); email.Subject := koreanChars; email.From := 'Chilkat Support <support@chilkatsoft.com>'; email.AddTo('TagTooga','admin@tagtooga.com'); email.Body := koreanChars; // Note: we did not indicate anything about charset. The // Chilkat email component automatically recognizes that all characters // are Korean and encodes the email using the ks_c_5601-1987 charset. // The subject header field is automatically "B" encoded. If you view // the MIME source of the email sent, you would see these two header fields: // // Content-Type: text/plain; charset="ks_c_5601-1987" // subject: =?ks_c_5601-1987?B?s6q0wiDAr7iuuKYguNTAuyC89iA=?= // =?ks_c_5601-1987?B?wNa+7r/k?= // // Also, if the email component detected a mixture of several languages in the // email, it would've chosen the utf-8 encoding instead. This is the only possible // character encoding for emails that mix languages with different multibyte encodings. ok := ChilkatMailMan21.SendEmail(email); if (ok = 0) then ChilkatMailMan21.SaveLastError('errorLog.xml'); end;
|
Need a specific example? Send a request to support@chilkatsoft.com
© 2000-2010 Chilkat Software, Inc. All Rights Reserved.