【问题标题】:SendGrid - Custom Event Notification App in headerSendGrid - 标题中的自定义事件通知应用程序
【发布时间】:2011-06-08 02:03:23
【问题描述】:

我正在尝试将 SendGrid 的事件通知应用程序 (http://sendgrid.com/documentation/display/apps/EventNotification) 用于某些类别的电子邮件。我的 SendGrid 帐户上的事件通知是空的。我在电子邮件中的标题是:

X-SMTPAPI: {"category":"category","filters":{"eventnotification":{"settings":{"url":"theurl"}}}}

但我的网址没有收到回调。在这个给定的 url 上的一个简单的 curl 帖子给了我预期的输出,所以我很确定它也应该与 SendGrid 一起工作。

您对标题的外观有什么想法吗?我在网站上找不到有关此特定应用的太多文档...

谢谢!

【问题讨论】:

    标签: ruby-on-rails sendgrid


    【解决方案1】:

    以下是我通过 Sendgrid 电子邮件成功发送的标头示例:

    headers("X-SMTPAPI" => "{\"unique_args\": {\"customer_id\":\"#{customer.id}\",\"email_batch_id\":\"#{batch_id}\"}, \"category\":\"monthly_statement\"}")
    

    确保在 Sendgrid 的事件通知设置下检查了正确的事件。

    【讨论】:

      猜你喜欢
      • 2021-10-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-06-11
      相关资源
      最近更新 更多