I found a or the "fix." Instead of setting .HTMLBodyPart.Charset =
"iso-2022-jp", I set
..TextBodyPart.Charset = "iso-2022-jp". This works. I presume because setting
the .AutoGenerateTextBody = True will create the HTMLMessage from the
TextMessage encoding.
Now, how do I set the .subject to encode/display in Japanese????
- Avram Grossman
"Avram Grossman" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am using the classic examples from MSDN on CDOSYS and need to send a
> message body formatted with HTML and contains Japanese characters. The
body
> tag in the HTML sets the character encoding using < meta
> http-equiv="Content-Type" content="text/html; charset=iso-2022-jp" >. The
> received message encoding is in Western ISO, not iso-2022-jp and therefore
> not viewed in Japanese. If you switch the browser to display japanese
> encoding, the message is displayed in Japanese just fine.
>
> I've tried every combination and permutation I can find.
> ------------------------------------------------------------------
> Function SendCDOSYS(sTo, sFrom, sCC, sSubject, sMessage)
> Dim iConf
> Dim iMsg
> Dim Flds
> Set iConf = CreateObject("CDO.Configuration")
> Set iMsg = CreateObject("CDO.Message")
> Set Flds = iConf.Fields
> Flds(cdoSendUsingMethod) = cdoSendUsingPort
> Flds(cdoSMTPServer) = "mail.MyEmailServer.com"
> Flds(cdoSMTPServerPort) = 25
> Flds(cdoSMTPAuthenticate) = cdoAnonymous ' 0
> Flds(cdoLanguageCode).Value = "JA" 'This line seems to not make a
> difference
> Flds.Update
>
> With iMsg
> Set .Configuration = iConf
> .MimeFormatted = true
> .AutoGenerateTextBody = True
> ' Build Message Header
> .To = sTo
> .From = "(E-Mail Removed)"
> .Subject = sSubject
> ' Build Message content
> .HTMLBody = sMessage
> If InStr(sMessage,"shift_jis") > 0 OR
InStr(sMessage,"iso-2022-jp")
> > 0 Then
> .BodyPart.Charset = "iso-2022-jp"
> .HTMLBodyPart.Charset = "iso-2022-jp"
> End If
> .Send
> End With
>
> Set iMsg = Nothing
> Set iConf = Nothing
> Set Flds = Nothing
> Set IBodyPart = Nothing
> SendCDO = true
> End Function
> -----------------------------------------------------
> What am I not doing right or missing?
> Thanks
>
>
>
|