检索通过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
任何帮助将不胜感激。
这些事件通过SendGrid's Event Webhook发送给您。要使用webhook,您必须设置一个接受POST请求的服务器,并处理这些POST请求中的数据。
这article explains webhooks和继续讨论如何创建REST Services in C#,你需要使用webhook。
编辑:这个Github Project是一个很好的例子,说明如何在C#中使用SendGrid的Event Webhook。
如果你不想使用我们的网络挂接,你可以试试:
的Web API:
http://sendgrid.com/docs/API_Reference/Web_API/Statistics/index.htmlhttp://sendgrid.com/docs/API_Reference/Web_API/Statistics/statistics_advanced.html
下面是一些示例代码:
http://sendgrid.com/blog/using-sendgrid-with-visual-studio-2013-preview-for-windows-8-1-development
随着对此的警告,您只能跟踪汇总数据,而不是以个别电子邮件为基础的数据。 –
SendGrid不是Microsoft服务,它是另一家公司在Azure上托管的服务。您是否检查了他们的[documentation](http://sendgrid.com/docs/),尤其是[Delivery Metrics](http://sendgrid.com/docs/Delivery_Metrics/index.html)部分? –
是的,我已经检查过它的文档,但我不知道如何才能通过c#代码获得所有功能。但是,我所要求的所有功能都在文档中进行了解释,但我需要代码示例。 – coolhimanshu