次の方法で共有


AgentNotificationExtensions.CreateEmailResponseActivity Method

Definition

Creates a reply Activity containing an EmailResponse entity populated with the provided HTML body.

public static Microsoft.Agents.Core.Models.IActivity CreateEmailResponseActivity(this Microsoft.Agents.Core.Models.IActivity activity, string emailResponseHtmlBody);
static member CreateEmailResponseActivity : Microsoft.Agents.Core.Models.IActivity * string -> Microsoft.Agents.Core.Models.IActivity
<Extension()>
Public Function CreateEmailResponseActivity (activity As IActivity, emailResponseHtmlBody As String) As IActivity

Parameters

activity
IActivity

The source Activity this reply is based on. Routing/conversation metadata is copied via CreateReply(String, String).

emailResponseHtmlBody
String

The HTML body content to include in the EmailResponse entity.

Returns

A new IActivity reply whose Entities collection includes an EmailResponse carrying the supplied HTML body.

Remarks

This helper wraps two operations: 1. Calls CreateReply(String, String) to initialize a response Activity with proper conversation context. 2. Adds a newly constructed EmailResponse (with the provided HTML body) to the reply's Entities. The method does not perform HTML validation or sanitization; callers should ensure the HTML body is safe for downstream rendering.

Applies to