Send email to exchange versus SMTP

D

dbguru316

I have two separate scripts that run depending on if the e-mail is going to a
SMTP server, or through an exchange server. The below SMTP script works
perfect using authentication an SSL:

Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingPort
.Item(strSch & "smtpserver") = varsmtpserver
.Item(strSch & "smtpauthenticate") = cdoBasic
.Item(strSch & "smtpserverport") = varsmtpserverport
.Item(strSch & "sendusername") = varfromusernamesmptauth
.Item(strSch & "sendpassword") = varsendpassword
.Item(strSch & "smtpusessl") = True
.Update
End With
End If

Now I need to set up a similar one for exchange 2007. I am using one that
was taken from a Microsoft technet:

Set objCDOConfig = CreateObject("CDO.Configuration")
With objCDOConfig.Fields
.Item(strSch & "sendusing") = cdoSendUsingExchange
.Item(strSch & "mailboxurl")=
"file://./backofficestorage/subdomain.example.com/mbx/user/"
.Update

I received a message Field Update Failed. Check status of indivial fields....

Is this not the correct code for exchange 2007?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

vbscript to send e-mail to exchange 2007 0
Sending E-mail 3
Sending E-Mail 11
WildCard 16
Send html in body 0
DoEvents 3
CDO & MailMessage problem 2
Using the CDO object to send email... 3

Top