我有一个程序可以在用户添加后向用户发送电子邮件。
我希望将电子邮件抄送给 IT 团队的多个成员,但是,我只能将它抄送给一个人。
下面是我的代码:
objMail = CType(objOutlook.CreateItem(Outlook.OlItemType.olMailItem), Outlook.MailItem)
' Set the properties of the email.
With objMail
.Subject = "Website Credentials"
.To = "chris.downs@test.com"
.CC = "benji@test.com, Alicia@test.com"
.Body = "Hi"
.Send()
End With
这会导致电子邮件根本无法发送。我也尝试了以下方法,而这只是 CC 的最后一个人,而不是两者兼而有之。
' Set the properties of the email.
With objMail
.Subject = "Website Credentials"
.To = "chris.downs@test.com"
.CC = "benji@test.com"
.CC = "Alicia@test.com"
.Body = "Hi"
.Send()
End With
有没有一种我想念的简单方法?