Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Outlook send email multiple recipients
Here is a sample of what I've tried so far:
recip="sa@mterminals.com; tom@thumb.com"
recip="sa@mterminals.com;tom@thumb.com"
Any thoughts?
objOutlook = ObjectOpen("Outlook.Application") ; Create the message. objOutlookMsg = objOutlook.CreateItem(0) ; Display to user (the following line can be removed if you do not want any interface) objOutlookMsg.Display ; add Recipient objOutlookRecip=objOutlookMsg.Recipients objOutlookRecip.Add(Recip) ;<<<<<<< objOutlookRecip.Add(Recip2) ;<<<<<<< ; Set the Subject, Body, objOutlookMsg.Subject = "This is an Automation test with Microsoft Outlook" objOutlookMsg.Body = strcat("This is the body of the message.",@CRLF) ; Add attachments to the message. objOutlookAttach = objOutlookMsg.Attachments objOutlookAttach.Add(AttachmentPath) objOutlookMsg.Send ObjectClose(objOutlook) exit
;Send an email to multiple BCC recipients reciplist = "john_doe@test.com|fred_doe@test.com|jack_doe@test.com" Csubject = "Test" Cbody = "Testing OLE Outlook" objOutlook = ObjectOpen("Outlook.Application") ; create object objOutlookMsg = objOutlook.createitem(0) objOutlookRecip = objOutlookMsg.Recipients ;objoutlookmsg.display count = ItemCount(reciplist, "|") For x = 1 to count Cname = ItemExtract(x, reciplist, "|") ;add this recipient objOutlookRecip.Add(Cname) ;make this recipient a BCC recip_1 = objOutlookRecip.Item(x) olBCC = 3 recip_1.Type = olBCC Next ;Define the subject objOutlookmsg.Subject = Csubject ;Define the message body objOutlookmsg.Body = Cbody objOutlookMsg.Send ObjectClose(objOutlook) exit
Article ID: W14920
File Created: 2002:02:14:12:15:58
Last Updated: 2002:02:14:12:15:58