By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,640 Members | 2,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,640 IT Pros & Developers. It's quick & easy.

CDO question

P: n/a
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"" <xx*@xxx.net>"
.From = "<xx***@xxx.us>"
'.From = """User B"" <xx**@comcast.net>"
.Subject = "Access CDO test"
'.BCC = "<xx**@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
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
MA
> 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"" <xx*@xxx.net>"
.From = "<xx***@xxx.us>"
'.From = """User B"" <xx**@comcast.net>"
.Subject = "Access CDO test"
'.BCC = "<xx**@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
Nov 13 '05 #2

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

-- "MA" <ma****@massimilianoamendola.it> wrote in message
news:0_*******************@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"" <xx*@xxx.net>"
.From = "<xx***@xxx.us>"
'.From = """User B"" <xx**@comcast.net>"
.Subject = "Access CDO test"
'.BCC = "<xx**@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

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.