c# - SendGridApiClient 获取传递响应

标签 c# sendgrid

刚刚开始使用 SendGridApiClient 实现电子邮件发送。有发送电子邮件的行

dynamic response = await _sendGrid.client.mail.send.post(requestBody: mail.Get());

响应可以提供StatusCode Accepted,仅此而已。想知道如何检查电子邮件是否已送达或卡住?

最佳答案

SendGrid API 是异步的,因为处理电子邮件传送所需的时间很长,并且取决于接收服务器等因素。

实时关注已发送、退回等事件的最佳方法是实现事件 Webhook。

看看这个答案:Can my ASP.Net Code get confirmation from sendgrid that an email has been sent?

关于c# - SendGridApiClient 获取传递响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40319190/

相关文章:

c# - LINQ 和对象引用的问题

email - SendGrid 中的组合 Handlebars

javascript - 如何在javascript中使模块异步

php - sendgrid php 示例 - 如何添加发件人姓名?

php - 如何使用(发送网格)php api 在列表中添加联系人

c# - Windows Form App 和 Windows Form App (.Net Framework) 有什么区别?

c# - 为什么我多了一个角色?

c# - C#编译错误: “lc.exe” exited with code -1073741819

c# - 强制触发 `Click` 事件 - 使用反射?

sendgrid - 提交表单后通过 SendGrid 发送电子邮件