Azure SendGrid DeliverAsync 工作但不交付

Azure SendGrid DeliverAsync works but not Deliver

我使用他们的文档作为指南连接了 SendGrid。这里没什么特别的,只是想为某些事件发送一封电子邮件。查看下面的代码,SendGrid 文档指示我使用 transportWeb.Deliver(message) 但这会导致 "cannot resolve symbol Deliver" 但是如果我使用 DeliverAsync 一切正常。定义一个从未使用过的变量似乎很草率。

SendGridMessage message = new SendGridMessage();
message.AddTo(to);
message.From = new MailAddress(from);
message.Subject = subject;
message.Text = body;
var uid = AppConfigSettings.SendGridUid;
var pw = AppConfigSettings.SendGridPw;
var credentials = new NetworkCredential(uid, pw);
var transportWeb = new Web(credentials);
// transportWeb.Deliver(message); // "Deliver" won't resolve
var result = transportWeb.DeliverAsync(message);

Deliver() was removed 在最新版本的库中。你能 link 帮我看看过期的文档吗?