![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Why got garbage code when sending email through CDO.Message Save the following code as a.vbs, run it, it shows an error message with garbage code in Chinese windows. I know the error reason, just wanna see normal error message. Could you help? Thanks! --- Dim o Set o = CreateObject("CDO.Message") o.From = "a@xxxxxx" o.To = "a@xxxxxx" o.Subject = "abc" o.TextBody = "abc" With o.Configuration .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.isoft-asia.com" .Fields.Update End With o.Send |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message "hghua" <hghua@xxxxxx> wrote in message news:24F345B4-EC68-4118-8411-CC377A5F8235@xxxxxx Quote: > Save the following code as a.vbs, run it, it shows an error message with > garbage code in Chinese windows. > > I know the error reason, just wanna see normal error message. > > Could you help? Thanks! > --- > Dim o > Set o = CreateObject("CDO.Message") > > o.From = "a@xxxxxx" > o.To = "a@xxxxxx" > o.Subject = "abc" > o.TextBody = "abc" > With o.Configuration > .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 > .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = > "mail.isoft-asia.com" > .Fields.Update > End With > o.Send message and no garbage. It simply worked. ..Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = "smtp@xxxxxx" ..Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "somepassword" |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message "the transport failed to connect to the server" /Al "hghua" <hghua@xxxxxx> wrote in message news:24F345B4-EC68-4118-8411-CC377A5F8235@xxxxxx Quote: > Save the following code as a.vbs, run it, it shows an error message with > garbage code in Chinese windows. > > I know the error reason, just wanna see normal error message. > > Could you help? Thanks! > --- > Dim o > Set o = CreateObject("CDO.Message") > > o.From = "a@xxxxxx" > o.To = "a@xxxxxx" > o.Subject = "abc" > o.TextBody = "abc" > With o.Configuration > .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 > .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = > "mail.isoft-asia.com" > .Fields.Update > End With > o.Send |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message "hghua" <hghua@xxxxxx> wrote in message news:24F345B4-EC68-4118-8411-CC377A5F8235@xxxxxx Quote: > Save the following code as a.vbs, run it, it shows an error message with > garbage code in Chinese windows. > > I know the error reason, just wanna see normal error message. > > Could you help? Thanks! > --- > Dim o > Set o = CreateObject("CDO.Message") > > o.From = "a@xxxxxx" > o.To = "a@xxxxxx" > o.Subject = "abc" > o.TextBody = "abc" > With o.Configuration > .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 > .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = > "mail.isoft-asia.com" > .Fields.Update > End With > o.Send I once had a similar problem with what I called 'crazy characters' in the message boxes produced by wordpad and mspaint on my WXP SP2 system. The message boxes from all other applications were normal, but these two applications produced what were to me Chinese-like characters in the text of the message. I posted a question about it and received a reply that solved the problem in microsoft.public.windowsxp.general. Groups.google.com is the best way to find these old posts. Go there and enter the following in the search box: crazy font group:microsoft.* author aul randallPlease let us know if this fixes your problem. -Paul Randall |
My System Specs![]() |
| | #5 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message You need to research the Configuration object and look for a character encoding attribute and set it to the encoding used on the Chinese machine. |
My System Specs![]() |
| | #6 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message I tried to set CdoConfiguration.cdoLanguageCode to "en-us" and CdoConfiguration.cdoUseMessageResponseText to "true", but no luck. "gimme_this_gimme_that@xxxxxx" wrote: Quote: > You need to research the Configuration object and look for a character > encoding attribute and set it to the encoding used on the Chinese > machine. > |
My System Specs![]() |
| | #7 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message I know setting sendusername and sendpassword will solve the error, but what I wonder is how to see normal readable error message in Chinese windows. "Pegasus (MVP)" wrote: Quote: > > "hghua" <hghua@xxxxxx> wrote in message > news:24F345B4-EC68-4118-8411-CC377A5F8235@xxxxxx Quote: > > Save the following code as a.vbs, run it, it shows an error message with > > garbage code in Chinese windows. > > > > I know the error reason, just wanna see normal error message. > > > > Could you help? Thanks! > > --- > > Dim o > > Set o = CreateObject("CDO.Message") > > > > o.From = "a@xxxxxx" > > o.To = "a@xxxxxx" > > o.Subject = "abc" > > o.TextBody = "abc" > > With o.Configuration > > .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 > > .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = > > "mail.isoft-asia.com" > > .Fields.Update > > End With > > o.Send > I tried your script (after adding the two lines below) and got no error > message and no garbage. It simply worked. > ..Fields("http://schemas.microsoft.com/cdo/configuration/sendusername") = > "smtp@xxxxxx" > ..Fields("http://schemas.microsoft.com/cdo/configuration/sendpassword") = > "somepassword" |
My System Specs![]() |
| | #8 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message Thanks! But it doesn't work. "Paul Randall" wrote: Quote: > > "hghua" <hghua@xxxxxx> wrote in message > news:24F345B4-EC68-4118-8411-CC377A5F8235@xxxxxx Quote: > > Save the following code as a.vbs, run it, it shows an error message with > > garbage code in Chinese windows. > > > > I know the error reason, just wanna see normal error message. > > > > Could you help? Thanks! > > --- > > Dim o > > Set o = CreateObject("CDO.Message") > > > > o.From = "a@xxxxxx" > > o.To = "a@xxxxxx" > > o.Subject = "abc" > > o.TextBody = "abc" > > With o.Configuration > > .Fields("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 > > .Fields("http://schemas.microsoft.com/cdo/configuration/smtpserver") = > > "mail.isoft-asia.com" > > .Fields.Update > > End With > > o.Send > Since I don't get the 'garbage code', I can't verify your problem. > > I once had a similar problem with what I called 'crazy characters' in the > message boxes produced by wordpad and mspaint on my WXP SP2 system. The > message boxes from all other applications were normal, but these two > applications produced what were to me Chinese-like characters in the text of > the message. I posted a question about it and received a reply that solved > the problem in microsoft.public.windowsxp.general. > > Groups.google.com is the best way to find these old posts. Go there and > enter the following in the search box: > crazy font group:microsoft.* author aul randall> > Please let us know if this fixes your problem. > > -Paul Randall > > > |
My System Specs![]() |
| | #9 (permalink) |
| | RE: Why got garbage code when sending email through CDO.Message Here is the error message snapshot: http://bscsh.3322.org/a.jpg |
My System Specs![]() |
| | #10 (permalink) |
| | Re: Why got garbage code when sending email through CDO.Message Well you could go down the road of setting the language code to zh-tw instead of en-us. You'll have to encode the subject and the text you're sending on your end as well. In VBScript there I haven't seen a simple way to do that. In Java there is: String t = new String("my string","UTF-8"); // UTF-8 |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Sending message on email | Vista mail | |||
| sending email error message | Vista mail | |||
| Error message while sending email | Vista mail | |||
| Windows Live Mail-No message in body of email when sending email m | Live Mail | |||
| error message when sending email | Vista mail | |||