Recipients Object
Overview
The recipients object holds all recipient information, where it can be accessed through the MailItem.
Example
The following code example demonstrates this capability:
vba
' Initializes the nlsMailer Application
Dim MailerApp As nlsMailer.Application
Set MailerApp = New nlsMailer.Application
' Adds an account
Dim accOne As nlsMailer.Account
Set accOne = MailerApp.Accounts.Add SMTPAddress:="test@example.com", _
ApiKey:="api-key-0123456789", _
ApiUrl:="https://apiUrl.com", _
AccountType:=olMailgun
Dim mailItem As nlsMailer.MailItem
Set mailItem = MailerApp.CreateItem(olMailItem)
' Handles recipient objects through recipients object
Dim recipient As nlsMailer.Recipient
Set recipient = mailItem.Recipients.Add("recipient@example.com")
Set recipient = mailItem.Recipients.Item(1)
Methods
Name | Type |
---|---|
Add |
Recipient |
Item |
Recipient |
Remove |
Void |
Properties
Name | Type |
---|---|
Class |
olObjectClass |
Count |
Long |
Parent |
MailItem |