Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send email to 2 recipients (MAPI)

Status
Not open for further replies.

MattN

Programmer
Jan 21, 2002
29
0
0
GB
I would like to send an email to 2 recipients using the Mapi controls.
I have tried with the semi-colon seperating the two addrersses (see below) but this soes not work.

NOTE: I don't want to use a loop as I want both recipients to see that the other person has received it.

MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipAddress = "test@mailserver.com; test@mailserver.com"
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
MAPIMessages1.MsgSubject = "Test Mail"
MAPIMessages1.MsgNoteText = "Please Read Test mail"
MAPIMessages1.Send
MAPISession1.SignOff

Any suggestions would be greatly appriciated!

Thanks in advance

MattN
 
Have you tried putting the recipients on different lines. I use VBA to do this (I know not the same but similar)

and using outlook i would do

MAPIMessage1.Recipients.Add = "address1"
MAPIMessage1.Recipients.Add = "address2"

Could that work for you?
 
FYI,

This seems to work.

Thanks Anyway

MAPISession1.SignOn
MAPIMessages1.SessionID = MAPISession1.SessionID
MAPIMessages1.Compose
MAPIMessages1.RecipIndex = 0
MAPIMessages1.RecipAddress = "test@mailserver.com
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
MAPIMessages1.RecipIndex = 1
MAPIMessages1.RecipAddress = "test1@mailserver.com
MAPIMessages1.AddressResolveUI = True
MAPIMessages1.ResolveName
MAPIMessages1.MsgSubject = "Test Mail"
MAPIMessages1.MsgNoteText = "Please Read Test mail"
MAPIMessages1.Send
MAPISession1.SignOff
 
Comma there, not semi-colon like Outlook.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top