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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problems with CDO

Status
Not open for further replies.

INFORMAT

Programmer
Jan 3, 2001
121
BE
Hi,

I have made a program to send out our newsletters to all are clients. No i want to deploy this program on a other pc (who will be responsible for the newsletters), but when I want to mail the newsletters from my app on his pc, I get an error. I have been able to figure out that the problem was when he has to update the configuration fields:

this is my code:


Dim msgoutlook As New CDO.Message
Dim objConfig As New CDO.Configuration
Dim fields
objConfig.Load(CdoConfigSource.cdoDefaults)

fields = objConfig.Fields

' Set config fields we care about
With fields
.Item(" = 2
.Item(" = "mysmtpserver"
.item(" = 30
.item(" = 25
.item(4) = "someone"
.item(" = 1
.item(" = "someone"
.item(" = "password"
.Update()
End With

if I put the update() in a try - catch, than I get an error when I want to send the email.

because I have made a reference to an COM-object (cdosys.dll), VS.net has made an interop.cdo.dll
the problem should be in de interop.cdo dll.
has anyone has an idea on how I can solve this problem?

thanks
Björn
 
Zarcom wrote a neat little FAQ on sending email. You may want to change your code to use the .NET Mail class:

FAQ796-2119
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top