This is a discussion on Cannot send messages with CDO - Microsoft Exchange ; I'm trying to send messages using CDO from a script. I've tried several things, but nothing seems to work. Here's what I've tried: 1) Used the following code in the script: Dim objMsg Dim iConf Dim Flds Const cdoSendUsingPickup = ...
I'm trying to send messages using CDO from a script. I've
tried several things, but nothing seems to work.
Here's what I've tried:
1) Used the following code in the script:
Const cdoSendUsingPickup = 1
Set iConf = CreateObject("CDO.Configuration")
Set objMsg = CreateObject("CDO.Message")
Set Flds = iConf.Fields
) = cdoSendUsingPickup
pickupdirectory") = cdoSMTPServerPickupDirectory
Set .Configuration = iConf
..TextBody = "Test message"
..To = "email@example.com"
..From = "firstname.lastname@example.org"
..Subject = "Test"
Which doesn't work. If I try to log what's going on, I see
that the script stops on the .Send command
2) Tried basically the same as 1), except without using
the Configuration object. Same result
3) Tried using .DataSource.Save instead of .Send, with the
same result as under option 1)
I've Exchange 2000 installed on the machine the script is
running on, and was logged on as an Administrator when I
tried to do this. Furthermore, the all the scripts 1) 2)
and 3) did start processing things, but just refused to
send the message.
Does anyone know what I'm doing wrong here?
Any help is appreciated.