检索通过SendGrid发送的电子邮件的状态

问题描述:

我正在使用Microsoft Windows Azure云平台的c#中创建应用程序。检索通过SendGrid发送的电子邮件的状态

我需要知道如何通过使用在azure上托管的SendGrid服务来跟踪电子邮件。跟踪状态可能是。

4. Track sent emails to determine if they were: 
4.1 delivered 
4.2 opened 
4.3 recipient opt-out 
4.4 bounced (with the reason for the bounce) 
4.5 time/date sent 
4.6 which links in the email were clicked (and time/date they were clicked) 
4.7 IP address, if user clicked any links in the email 

任何帮助将不胜感激。

+0

SendGrid不是Microsoft服务,它是另一家公司在Azure上托管的服务。您是否检查了他们的[documentation](http://sendgrid.com/docs/),尤其是[Delivery Metrics](http://sendgrid.com/docs/Delivery_Metrics/index.html)部分? –

+0

是的,我已经检查过它的文档,但我不知道如何才能通过c#代码获得所有功能。但是,我所要求的所有功能都在文档中进行了解释,但我需要代码示例。 – coolhimanshu

这些事件通过SendGrid's Event Webhook发送给您。要使用webhook,您必须设置一个接受POST请求的服务器,并处理这些POST请求中的数据。

article explains webhooks和继续讨论如何创建REST Services in C#,你需要使用webhook。

编辑:这个Github Project是一个很好的例子,说明如何在C#中使用SendGrid的Event Webhook。

+2

随着对此的警告,您只能跟踪汇总数据,而不是以个别电子邮件为基础的数据。 –