This function adds a recipient with specified name and e-mail address to the message.
object.AddCustom
aValue
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISMessageRecipients interface |
|
aValue |
In, Required | string |
The name and e-mail address of the
recipient |
Append different types of the recipients to the message and display the computed destination string.
Dim aMes
Dim aRecipients
Dim aPatient
Dim aProvider
Dim aExProvider
Set aMes = Profile.CreateMessage
set aRecipients = aMes.Recipients
aMes.Text = aMes.AddText("Hello! Come to my birthday party!")
aMes.Subject = "Birthday party"
set aPatient = Profile.SelectPatient
if aPatient.Email <> "" then
aMes.Recipients.AddPatient(aPatient)
end if
set aProvider = Profile.LoadProvider("MM")
if aProvider.Email <> "" then
aMes.Recipients.AddProvider(aProvider)
end if
set aExProvider = Profile.LoadExternalProvider("MILLEJ")
if aExProvider.Email <> "" then
aMes.Recipients.AddExternalProvider(aExProvider)
end if
aRecipients.AddCustom "James Bond <007007007@007007007.007007007>"
aMes.Send
Profile.MsgBox aMes.Destination