selena1
Programmer
- Apr 7, 2003
- 69
Hi,
I've Installed Exchange Server 2007 on Windows Server 2003 SP2 machine. I need to send all broadcasted emails from ADMIN account to all newly created users. My idea is to have all this emails in draft folder of ADMIN mailbox and then using vbscript and CDO objects to send them to the users. From my PC my script works OK (I've installed MS Office Outlook 2003) except security warning ("A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?" Need to click Yes.) But I want to run script on server. I've downloaded and installed Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (ExchangeMapiCdo.EXE). Now I can send email using smtp:
Set objEmail = CreateObject("CDO.Message")
.
.
objEmail.Send
But when I tried to create MAPI session (I need it to read draft folder):
snServername = "xxx"
mbMailboxName = "xxx.xxx"
set objShell = CreateObject("WScript.Shell")
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "","",false,true,true,true,snServername & vbLF & mbMailboxName
I got an error on line "Set objSession = CreateObject("MAPI.Session")":
activex component can't create object: 'mapi.session' 800a01ad
Why is this?
Server doesn't have any version of MS Outlook installed on it.
I have these CDO files on server:
cdosys.dll C:\WINDOWS\system32
cdoex.dll C:\Program Files\Common Files\Microsoft Shared\CDO
CDO.DLL C:\Program Files (x86)\ExchangeMapi
(and some others)
Can you help me with this?
Thanks!
I've Installed Exchange Server 2007 on Windows Server 2003 SP2 machine. I need to send all broadcasted emails from ADMIN account to all newly created users. My idea is to have all this emails in draft folder of ADMIN mailbox and then using vbscript and CDO objects to send them to the users. From my PC my script works OK (I've installed MS Office Outlook 2003) except security warning ("A program is trying to access e-mail addresses you have stored in Outlook. Do you want to allow this?" Need to click Yes.) But I want to run script on server. I've downloaded and installed Microsoft Exchange Server MAPI Client and Collaboration Data Objects 1.2.1 (ExchangeMapiCdo.EXE). Now I can send email using smtp:
Set objEmail = CreateObject("CDO.Message")
.
.
objEmail.Send
But when I tried to create MAPI session (I need it to read draft folder):
snServername = "xxx"
mbMailboxName = "xxx.xxx"
set objShell = CreateObject("WScript.Shell")
Set objSession = CreateObject("MAPI.Session")
objSession.Logon "","",false,true,true,true,snServername & vbLF & mbMailboxName
I got an error on line "Set objSession = CreateObject("MAPI.Session")":
activex component can't create object: 'mapi.session' 800a01ad
Why is this?
Server doesn't have any version of MS Outlook installed on it.
I have these CDO files on server:
cdosys.dll C:\WINDOWS\system32
cdoex.dll C:\Program Files\Common Files\Microsoft Shared\CDO
CDO.DLL C:\Program Files (x86)\ExchangeMapi
(and some others)
Can you help me with this?
Thanks!