Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_cdo thread: Sending Japanese emails via CDOSYS using Oracle utf8 db


Message #1 by "Robert van der Kooij" <rvanderkooij@h...> on Thu, 30 May 2002 18:24:10
Hi,

Using to code below I'm able to send email's with Japanese characters if I 
use an access 2000 db. If I try to do the same but then using a Oracle8 
(utf8) database it fails. I'm getting only scrambled content. 
Does anybody have any idea / experience in sending emails with mulitbyte 
characters using CDOSYS and Oracle?

Thanks,
Robert


Set objConfig = CreateObject("CDO.Configuration")

      objConfig.Fields.Item(cdoSendUsingMethod) = cdoSendUsingPort 
        objConfig.Fields.Item(cdoSMTPServer) = "mailserver"
        objConfig.Fields.Item(cdoSMTPConnectionTimeout) = 30
        objConfig.Fields.Item(cdoSMTPServerPort) = 25 
        objConfig.Fields.Update

Set iMsg = CreateObject("CDO.Message")
        Set iMsg.Configuration = objConfig

With iMsg
	.From    = "name@m..."
	.To      = "name@m..."
	.Subject = "A Japanese text message."
End With


Set iBp = iMsg.BodyPart
With iBp
   .Charset = "iso-2022-jp"
   .ContentMediaType        = "text/plain"
   .ContentTransferEncoding = "uuencode"

   Set Stm = .GetDecodedContentStream
   Stm.WriteText  rs3(1) & vbCrLf
   Stm.Flush

End With

iMsg.Send


  Return to Index