[英]Send email from bot framework FormFlow
我有一個使用FormFlow創建的示例機器人:
public static IForm<SandwichOrder> BuildForm()
{
OnCompletionAsyncDelegate<SandwichOrder> processOrder = async (context, state) =>
{
await context.PostAsync("We are currently processing your sandwich. We will message you the status.");
};
return new FormBuilder<SandwichOrder>()
.Message("Welcome to the sandwich order bot!")
.Field(nameof(Sandwich))
.Field(nameof(Length))
.Field(nameof(Bread))
.Field(nameof(Cheese))
.AddRemainingFields()
.Message("Thanks for ordering a sandwich!")
.OnCompletion(processOrder)
.Build();
}
表單完成后,控件位於:
OnCompletionAsyncDelegate<SandwichOrder> processOrder = async (context, state) =>
{
await context.PostAsync("We are currently processing your sandwich. We will message you the status.");
};
我想向我發送包含所有表單字段的電子郵件。 如何連接SMTP並編寫電子郵件功能以發送包含用戶所有選定選項和輸入的電子郵件?
這個問題與Botframework
,只是“如何從C#發送電子郵件”。
您有幾種選擇,例如:
SMTPClient
(例如,在這里查看: 使用C#通過SMTP發送電子郵件 ) 您要放入電子郵件中的字段包含在state
變量中
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.