preventing smtp addresses from being resolved

T

TonyD

I have a different problem using SMTP addresses. I have code to send
messages using SMTP addresses, (e-mail address removed). These addresses are
all customers. They are NOT in the address book of the individual
executing the code. The code does NOT issue the Resolve method. Despite
that, when the Send method is executed an attempt is made to resolve the
addresses and the message "Outlook does not recognize one or more names.
" is received. When resume 0 is used in the error handler, the code
remains in a loop. I have tries affixing "SMTP:" in front of each
address, without success. What can be added to the code to indicate that
the recipients are SMTP addresses and should not be resolved? Thanks.
 
D

Dmitry Streblechenko

What is your code that adds a recipient? What is the *exact* string that you
pass to Recipients.Add? Note that the names are still resolved, they are
just resolved to one-off recipients rather than address book entries.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
T

TonyD

The code is "Set objOutlookRecip = .Recipients.Add(pCC)", where pCC is
of the form (e-mail address removed). However, since your reply, I have
experimented with internal and external smtp addresses. A single
instance of either works, I now think that the problem is because the
pCC string actually contains a list, such as (e-mail address removed);
(e-mail address removed). Is there different code that can be used to add a
recipient list, or must a loop be created to send to each recipient in
the list?
 
T

TonyD

The code is "Set objOutlookRecip = .Recipients.Add(pCC)", where pCC is
of the form (e-mail address removed). However, since your reply, I have
experimented with internal and external smtp addresses. A single
instance of either works, I now think that the problem is because the
pCC string actually contains a list, such as (e-mail address removed);
(e-mail address removed). Is there different code that can be used to add a
recipient list, or must a loop be created to send to each recipient in
the list?
 
D

Dmitry Streblechenko

Either set the MailItem.CC property (can be ";" separated) or call
Recipients.Add for each recipient (must be one address per call).

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 

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