Decision:
I was looking for the syntax of a special character, but the problem was not building the message. I needed to add .BodyPart.Charset = "utf-8" to the CDO.Message object and use Unicode Chrw(8593) where I need it.
Sub sendMSSG(sbj As String, mssg As String) Dim cdoMail As New CDO.Message On Error GoTo err_Report With cdoMail With .Configuration.Fields .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort '2 .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "my.smtpserverserver.net" .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic '1 .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = sFROM .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = sFROMPWD .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 6 .Update End With .BodyPart.Charset = "utf-8" '<~~ THIS WAS REQUIRED .Subject = sbj .From = sFROM .To = sPHONEMSSGNO .Bcc = vbNullString .Cc = vbNullString .TextBody = mssg .Send End With Exit Sub err_Report: Debug.Print Err.Number & ": " & Err.Description End Sub
Apparently .BodyPart.Charset covers both the object and the body of the message, since I could use unicode in both.
Anyone who plans to use this code for their own purposes should add Microsoft CDO for the Windows 2000 library to their project using tools, links.
Jeeped
source share