resolve exchange list in vbs

N

Nicola Attico

Hi,
I'm using this vbscript code in order to send an e-mail message with
Outlook 2003
It works fine sending messages to a specific recipient
(e-mail address removed)
My problem is that I want to send a message to an EXCHANGE
distribution list and the ResolveAll method doesn't seem able to do
that
I tried putting LIST or (e-mail address removed) but the message stay in my
Draft folder and I get the error pop-up:
"Could not resolve the message recipients"
I'm able to resolve LIST from my Outlook client instead

Thanks,


Nicola Attico


**********
Dim rMail
Dim oItem
Dim ns
Dim Sync


Set rMail = CreateObject("Redemption.SafeMailItem")


set Application = CreateObject("Outlook.Application")
set NS = Application.GetNamespace("MAPI")
NS.Logon


Set oItem = Application.CreateItem(0)


rMail.Item = oItem
rmail.recipients.Add "(e-mail address removed)"
rmail.recipients.ResolveAll
strmessage = "test"
strsubject = ("scusate, è una prova di invio mail ad una lista di
distribuzione Exchange per un prospect..")
rmail.subject = strsubject
rmail.body = strmessage
rmail.Send


Set Sync = ns.SyncObjects.Item(1)
Set Utils = CreateObject("Redemption.MAPIUtils")
Utils.DeliverNow
 
S

Sue Mosher [MVP-Outlook]

Is the list resolvable if you type the same text manually into the To box? If not, please give more details about why you think it doesn't resolve.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/article.aspx?id=54

Hi,
I'm using this vbscript code in order to send an e-mail message with
Outlook 2003
It works fine sending messages to a specific recipient
(e-mail address removed)
My problem is that I want to send a message to an EXCHANGE
distribution list and the ResolveAll method doesn't seem able to do
that
I tried putting LIST or (e-mail address removed) but the message stay in my
Draft folder and I get the error pop-up:
"Could not resolve the message recipients"
I'm able to resolve LIST from my Outlook client instead

Thanks,


Nicola Attico


**********
Dim rMail
Dim oItem
Dim ns
Dim Sync


Set rMail = CreateObject("Redemption.SafeMailItem")


set Application = CreateObject("Outlook.Application")
set NS = Application.GetNamespace("MAPI")
NS.Logon


Set oItem = Application.CreateItem(0)


rMail.Item = oItem
rmail.recipients.Add "(e-mail address removed)"
rmail.recipients.ResolveAll
strmessage = "test"
strsubject = ("scusate, è una prova di invio mail ad una lista di
distribuzione Exchange per un prospect..")
rmail.subject = strsubject
rmail.body = strmessage
rmail.Send


Set Sync = ns.SyncObjects.Item(1)
Set Utils = CreateObject("Redemption.MAPIUtils")
Utils.DeliverNow
 

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

Top