CDO question

  • Follow


I am testing CDO for email. The following function works on one computer but
fails on the second computer with a messgage that "the server response was
not available".

Both computers are on the same network and can send a receive email from the
account I am using. The program compiles OK on both computers but some
reason I can't figure out, it fails on the second computer.

Public Function SendEmailUsingCDO()

' 11/4/03 worked on E2
' 10/25/04 works on E2 but won't work here on E1 ????
' on form or as as this function

Dim iMsg As New CDO.Message
Dim iConf As New CDO.Configuration

With iConf.Fields

  .Item(cdoSendUsingMethod) = cdoSendUsingPort

  .Item(cdoSMTPServer) = "smtp.comcast.net"
  .Item(cdoSMTPConnectionTimeout) = 15 ' quick timeout
  .Item(cdoSMTPAuthenticate) = cdoBasic
  .Item(cdoSendUserName) = "xxxxxx"
  '.Item(cdoSendPassword) = "xxxxxx"
  '.Item(cdoURLProxyServer) = "server:80"
  '.Item(cdoURLProxyBypass) = "<local>"
  '.Item(cdoURLGetLatestVersion) = True

  '.Update
End With

With iMsg
  Set .Configuration = iConf
      .To = """User A"" <xxx@xxx.net>"
      .From = "<xxxxx@xxx.us>"
      '.From = """User B"" <xxxx@comcast.net>"
      .Subject = "Access CDO test"
      '.BCC = "<xxxx@xxx.us>" never recd with/without <>
      '.CreateMHTMLBody "http://mypage"
      '.AddAttachment "C:\files\mybook.doc"
      '.
      .TextBody = "This is the body of the CDO message"
      .Send
End With

End Function


0
Reply 88karl3200 (58) 10/26/2004 2:36:01 PM

> I am testing CDO for email. The following function works on one computer
but
> fails on the second computer with a messgage that "the server response was
> not available".
>
> Both computers are on the same network and can send a receive email from
the
> account I am using. The program compiles OK on both computers but some
> reason I can't figure out, it fails on the second computer.
>
> Public Function SendEmailUsingCDO()
>
> ' 11/4/03 worked on E2
> ' 10/25/04 works on E2 but won't work here on E1 ????
> ' on form or as as this function
>
> Dim iMsg As New CDO.Message
> Dim iConf As New CDO.Configuration
>
> With iConf.Fields
>
>   .Item(cdoSendUsingMethod) = cdoSendUsingPort
>
>   .Item(cdoSMTPServer) = "smtp.comcast.net"
>   .Item(cdoSMTPConnectionTimeout) = 15 ' quick timeout
>   .Item(cdoSMTPAuthenticate) = cdoBasic
>   .Item(cdoSendUserName) = "xxxxxx"
>   '.Item(cdoSendPassword) = "xxxxxx"
>   '.Item(cdoURLProxyServer) = "server:80"
>   '.Item(cdoURLProxyBypass) = "<local>"
>   '.Item(cdoURLGetLatestVersion) = True
>
>   '.Update
> End With
>
> With iMsg
>   Set .Configuration = iConf
>       .To = """User A"" <xxx@xxx.net>"
>       .From = "<xxxxx@xxx.us>"
>       '.From = """User B"" <xxxx@comcast.net>"
>       .Subject = "Access CDO test"
>       '.BCC = "<xxxx@xxx.us>" never recd with/without <>
>       '.CreateMHTMLBody "http://mypage"
>       '.AddAttachment "C:\files\mybook.doc"
>       '.
>       .TextBody = "This is the body of the CDO message"
>       .Send
> End With
>
> End Function
>
have you added the refernces CDO ?
MAssimiliano


0
Reply master8346 (24) 10/27/2004 2:09:38 PM


Yes I have the CDO reference (it says Microsoft CDO for Windows 2000
Library) . I'm using XP on both machines.

-- "MA" <master@massimilianoamendola.it> wrote in message
news:0_Nfd.28331$B06.15852@news.edisontel.com...
> > I am testing CDO for email. The following function works on one computer
> but
> > fails on the second computer with a messgage that "the server response
was
> > not available".
> >
> > Both computers are on the same network and can send a receive email from
> the
> > account I am using. The program compiles OK on both computers but some
> > reason I can't figure out, it fails on the second computer.
> >
> > Public Function SendEmailUsingCDO()
> >
> > ' 11/4/03 worked on E2
> > ' 10/25/04 works on E2 but won't work here on E1 ????
> > ' on form or as as this function
> >
> > Dim iMsg As New CDO.Message
> > Dim iConf As New CDO.Configuration
> >
> > With iConf.Fields
> >
> >   .Item(cdoSendUsingMethod) = cdoSendUsingPort
> >
> >   .Item(cdoSMTPServer) = "smtp.comcast.net"
> >   .Item(cdoSMTPConnectionTimeout) = 15 ' quick timeout
> >   .Item(cdoSMTPAuthenticate) = cdoBasic
> >   .Item(cdoSendUserName) = "xxxxxx"
> >   '.Item(cdoSendPassword) = "xxxxxx"
> >   '.Item(cdoURLProxyServer) = "server:80"
> >   '.Item(cdoURLProxyBypass) = "<local>"
> >   '.Item(cdoURLGetLatestVersion) = True
> >
> >   '.Update
> > End With
> >
> > With iMsg
> >   Set .Configuration = iConf
> >       .To = """User A"" <xxx@xxx.net>"
> >       .From = "<xxxxx@xxx.us>"
> >       '.From = """User B"" <xxxx@comcast.net>"
> >       .Subject = "Access CDO test"
> >       '.BCC = "<xxxx@xxx.us>" never recd with/without <>
> >       '.CreateMHTMLBody "http://mypage"
> >       '.AddAttachment "C:\files\mybook.doc"
> >       '.
> >       .TextBody = "This is the body of the CDO message"
> >       .Send
> > End With
> >
> > End Function
> >
> have you added the refernces CDO ?
> MAssimiliano
>
>


0
Reply 88karl3200 (58) 10/27/2004 3:07:50 PM

2 Replies
24 Views

(page loaded in 0.058 seconds)


Reply: