0
我正在尋找如何從botframework意圖發送電子郵件的示例。如何從意圖發送BotFramework郵件
我曾嘗試下面的代碼,但沒有被髮送。我做錯了什麼?
[LuisIntent("TestEmailIntent")]
public async Task FindFundFactSheetAsync(IDialogContext context, LuisResult result)
{
var emailMessage = context.MakeMessage();
emailMessage.Recipient.Id = "[email protected]";
emailMessage.Recipient.Name = "John Cleophas";
emailMessage.Text ="Test message"
var data = new EmailContentData();
var channelData = Newtonsoft.Json.JsonConvert.SerializeObject(data);
emailMessage.ChannelData = channelData;
await context.PostAsync(emailMessage);
context.Wait(MessageReceived);
}
莫非的EmailContentData對象不應該是空白的,例如需要添加主題或消息正文? – K48
構造函數設置htmlbody,主題和重要性。默認值可以被覆蓋。 –
將值分配給它之前,emailMessage.Recipient.Id是什麼?它是否有價值或是否爲空? – K48