International e-mail
Dim objSMTP, strTemp ' Create mailer component Set objSMTP = CreateObject("MailBee.SMTP") ' Unlock SMTP component objSMTP.LicenseKey = "put your license key here" ' Set SMTP server name objSMTP.ServerName = "mail.server.com" ' Encode "From:" value as Cyrillic strTemp = objSMTP.Message.EncodeHeaderText("From", "Почта <postmaster@domain.com>", "windows-1251", 2) ' Assign encoded "From:" value to corresponding header objSMTP.Message.FromAddr = strTemp ' Set "To:" value, no encoding is required here ' since no international characters were used objSMTP.Message.ToAddr = "recipient@anotherdomain.com" ' Encode "Subject:" value as Simplified Chinese strTemp = objSMTP.Message.EncodeHeaderText("Subject", "你好", "gb-2312", 3) ' Assign encoded "Subject:" value to corresponding header objSMTP.Message.Subject = strTemp ' Set HTML format for the body objSMTP.Message.BodyFormat = 1 ' Mark that body content is composed with UTF-8 charset objSMTP.Message.Charset = "UTF-8" ' Compose HTML body using UTF-8 charset: ' Prepare HTML HEAD section. ToUTF8 is used here for clarity only ' (since UTF-8 representation of US characters is the same as their ' native representation) strTemp = objSMTP.Message.ToUTF8("<html><head>" & _ "<meta content=""text/html; charset=UTF-8"" http-equiv=Content-Type>" & _ "</head><body>" & _ "Word ""Text"" in Simplifed Chinese, Korean and Cyrillic:<br>") ' Print "Text" in Simplified Chinese strTemp = strTemp & objSMTP.Message.ToUTF8("ОД±ѕ<br>", "gb2312") ' Print "Text" in Simplified Korean strTemp = strTemp & objSMTP.Message.ToUTF8("їшє»<br>", "EUC-KR") ' Print "Text" in Cyrillic strTemp = strTemp & objSMTP.Message.ToUTF8("Текст</body></html>", "windows-1251") ' Assign UTF-8 content to the message body objSMTP.Message.BodyText = strTemp ' Send the message objSMTP.Send
Dim objSMTP, strTemp ' Create mailer component Set objSMTP = Server.CreateObject("MailBee.SMTP") ' Unlock SMTP component objSMTP.LicenseKey = "put your license key here" ' Set SMTP server name objSMTP.ServerName = "mail.server.com" ' Encode "From:" value as Cyrillic strTemp = objSMTP.Message.EncodeHeaderText("From", "Почта <postmaster@domain.com>", "windows-1251", 2) ' Assign encoded "From:" value to corresponding header objSMTP.Message.FromAddr = strTemp ' Set "To:" value, no encoding is required here ' since no international characters were used objSMTP.Message.ToAddr = "recipient@anotherdomain.com" ' Encode "Subject:" value as Simplified Chinese strTemp = objSMTP.Message.EncodeHeaderText("Subject", "你好", "gb2312", 2) ' Assign encoded "Subject:" value to corresponding header objSMTP.Message.Subject = strTemp ' Set HTML format for the body objSMTP.Message.BodyFormat = 1 ' Mark that body content is composed with UTF-8 charset objSMTP.Message.Charset = "UTF-8" ' Compose HTML body using UTF-8 charset: ' Prepare HTML HEAD section. ToUTF8 is used here for clarity only ' since UTF-8 representation of US characters is the same as their ' native representation strTemp = objSMTP.Message.ToUTF8("<html><head>" & _ "<meta content=""text/html; charset=UTF-8"" http-equiv=Content-Type>" & _ "</head><body>" & _ "Word ""Text"" in Simplifed Chinese, Korean and Cyrillic:<br>") ' Print "Text" in Simplified Chinese strTemp = strTemp & objSMTP.Message.ToUTF8("ОД±ѕ<br>", "gb2312") ' Print "Text" in Simplified Korean strTemp = strTemp & objSMTP.Message.ToUTF8("їшє»<br>", "EUC-KR") ' Print "Text" in Cyrillic strTemp = strTemp & objSMTP.Message.ToUTF8("Текст</body></html>", "windows-1251") ' Assign UTF-8 content to the message body objSMTP.Message.BodyText = strTemp ' Send the message objSMTP.SendSee Also: