The recipients of the message.
object.Recipients
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISMessage interface |
Display the text of the message, its subject and recipients.
sub main()
Dim aMes
Dim aPatient
Dim aProvider
Dim aExProvider
Set aMes = Profile.CreateMessage
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
aMes.Send
Profile.MsgBox("The message was successfully sent." & vbNewLine &_
GetMessageInfo(aMes))
end sub
function GetMessageInfo(aMessage)
Dim aInfo
Dim aMessageRecipients
Dim aRecipient
Dim Message
Dim i
aInfo = "Subject: " & aMessage.Subject & vbNewLine &_
"Text: " & aMessage.Text & vbNewLine & "Email: " &_
aMessage.DestinationEMail & vbNewLine
if not aMessage.Patient is nothing then
aInfo = aInfo &_
"Patient: " & aMessage.Patient.SurnameFirstName & vbNewLine
end if
set aMessageRecipients = aMessage.Recipients
for i = 0 to aMessageRecipients.Count - 1
set aRecipient = aMessageRecipients.Item(i)
aInfo = aInfo & "Recipients #" & (i + 1) & ": " &_
aRecipient.DisplayText & vbNewLine
next
GetMessageInfo = aInfo
end function
In Profile Client v8 on User Interface Recipients can be found in
.