SendInsecureMessage Method (HealthServiceConnection, IList(MailRecipient), String, String, String)

HealthVault
Sends an insecure message to the specified message recipients.

Namespace: Microsoft.Health
Assembly: Microsoft.Health (in Microsoft.Health.dll) Version: 2.1.0.0 (1.15.1003.9505)

public static void SendInsecureMessage(
	HealthServiceConnection connection,
	IList<MailRecipient> mailRecipient,
	string subject,
	string textBody,
	string htmlBody
)

Parameters

connection
Type: Microsoft.Health..::..HealthServiceConnection
The connection to use for this operation. The connection must have application capabilities.
mailRecipient
Type: System.Collections.Generic..::..IList<(Of <(<'MailRecipient>)>)>
The addresses and display names of the people to send the message to.
subject
Type: System..::..String
The subject of the message.
textBody
Type: System..::..String
The text body of the message.
htmlBody
Type: System..::..String
The HTML body of the message.

If both the textBody and htmlBody of the message is specified then a multi-part message will be sent so that the html body will be used and fallback to text if not supported by the client.

ExceptionCondition
System..::..ArgumentException The mailRecipient property is null or empty, or the subject parameter is null or empty, or the textBody and htmlBody parameters are both null or empty.
Microsoft.Health..::..HealthServiceException The server returned a failure when making the request.
Show: