如何通过CDO向一组收件人发送电子邮件?我正在使用VB6。
答案 0 :(得分:4)
您可以在.To行上列出多个收件人,方法是用“;”分隔,例如:
Set m = Server.CreateObject("CDO.Message")
m.Subject="subject..."
m.From="sender@example.com"
m.To="some@email.com;other@email.com;third@email.com"
m.TextBody="Message"
m.Send
答案 1 :(得分:-1)
这适用于Office 97以及我们当时拥有的任何Exchange:
Dim oOApp As Outlook.Application
Dim newMail As Outlook.MailItem
Set oOApp = CreateObject("Outlook.Application")
Set newMail = oOApp.CreateItem(olMailItem)
With newMail
.Display
.Body = whatever
.Subject = whatever
.Attachments.Add whatever
.Recipients.Add (whomever)
.Send
End With
Set newMail = Nothing
Set oOApp = Nothing