-
Send multiple emails in same event
Greetings everyone
I would like to automatically send two completely separate emails using two Outlook "Application_Reminder" events. However, I understand that it's only possible to have one of this type of event. Therefore, is there a way to combine two, or more, emails in a single event?
This is the sort of thing I'm trying to do:
Private Sub Application_Reminder(ByVal Item As Object)
Dim xMailItem As MailItem
Dim strbody As String
If Item.Class <> OlObjectClass.olTask Then Exit Sub
If Item.Categories <> "Recurring Email" Then Exit Sub
Set xMailItem = Outlook.Application.CreateItem(olMailItem)
'1st email
With xMailItem
.Subject = "Monthly Reminder"
.To = "address1-dot-com"
.Body = "Text for team A to read."
.SendUsingAccount = Session.Accounts("an-address-dot-com")
.Send
End With
'2nd email
With xMailItem
.Subject = "Monthly Reminder"
.To = "address2-dot-com"
.Body = "Text for team B to read."
.SendUsingAccount = Session.Accounts("a-different-address.com")
.Send
End With
'3rd email ….etc…
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules