Including multiple CC's in an Outlook Mail

2.2k views Asked by At

I have a program that sends and email out to user when they have been added in.

I want the email to cc in multiple members of the IT team, however, I can only get it to CC to one person.

Below is my code:

                objMail = CType(objOutlook.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem)

                ' Set the properties of the email.
                With objMail
                    .Subject = "Website Credentials"
                    .To = "[email protected]"
                    .CC = "[email protected], [email protected]"
                    .Body = "Hi"
                    .Send()
                End With

This causes the email not to send at all. I have also attempted the below and this only CC's the last person not both.

                ' Set the properties of the email.
                With objMail
                    .Subject = "Website Credentials"
                    .To = "[email protected]"
                    .CC = "[email protected]"
                    .CC = "[email protected]"
                    .Body = "Hi"
                    .Send()
                End With

Is there a simple way of doing this that I'm missing?

2

There are 2 answers

0
Jeff Zeitlin On BEST ANSWER

Outlook, unlike standard email clients, separates entries on the TO, CC, and BCC lines with ;, not ,. Change your CC line to

.CC = "[email protected]; [email protected]"

and it should send to both.

0
Simon H. On

Your first try wasnt that bad. Just replace the comma with a semicolon. I think it should work like this

    .CC = "[email protected]; [email protected]"