Condividi tramite


EmailResponse.CreateEmailResponseActivity(String) Method

Definition

Creates a new message IActivity and attaches an EmailResponse entity containing the supplied HTML body.

public static Microsoft.Agents.Core.Models.IActivity CreateEmailResponseActivity(string emailResponseHtmlBody);
static member CreateEmailResponseActivity : string -> Microsoft.Agents.Core.Models.IActivity
Public Shared Function CreateEmailResponseActivity (emailResponseHtmlBody As String) As IActivity

Parameters

emailResponseHtmlBody
String

The HTML body to embed in the EmailResponse entity. May be null or empty.

Returns

A message activity whose Entities collection includes a single EmailResponse entity populated with the specified HTML body.

Examples

var activity = EmailResponse.CreateEmailResponseActivity("<p>Processed results attached.</p>");
// Optionally set routing or other metadata:
activity.Locale = "en-US";

Remarks

The returned activity does not set Text; consumers are expected to render or process the HTML via the attached EmailResponse entity. Additional activity properties (e.g. importance, locale, attachments) can be set by the caller after creation.

Applies to