Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO Problem...

Status
Not open for further replies.

sweta

Programmer
Apr 1, 2003
35
IN
I've made a dll in VB which is used for sending mail. Delivery of the message is initiated

by transferring the message to a designated SMTP server.I am using CDO object and I use a

proxy server to connect to the internet.

I am giving The dll code snippet where I initialize the Configuration properties


Dim iMsg As New CDO.Message
Dim iConf As New CDO.Configuration
Dim Flds As ADODB.Fields
Dim strHTML

Set Flds = iConf.Fields

With Flds
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtp.xyz.com"
.Item(cdoSMTPAccountName) = "abc@xyz.com"
.Item(cdoURLProxyServer) = "194.68.1.19:4480"
.Item(cdoURLProxyBypass) = &quot;<local>&quot;
.Item(cdoURLGetLatestVersion) = True
.Item(cdoSMTPConnectionTimeout) = 10
.Update
End With


When I run this code I get an error saying Unable to connect to remote host.

If I use a direct connection and remove the proxy server settings, I get another error
related to the sender's domain.

Can anybody suggest a fix for this problem.

Thanks,
Sweta
 

Hi,

The SMTP Server is listening on the default port- 25. So I am not using the cdoSMTPServerPort property.

Thanks,
Sweta
 
I'm afraid I couldn't see anything wrong with your code, given that the values supplied are correct.

The only fields I can't see being set are cdoSMTPAuthenticate and cdoSendPassword.

I don't suppose increasing the timeout will help?

Paul Bent
Northwind IT Systems
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top