Mailgun获得反弹

时间:2014-10-15 08:24:17

标签: mailgun

根据日期,我可以用来获取当前日期的跳出吗?


    GET /domain/bounces/date or GET /domain/bounces/created_at

这可能吗?


    public static IRestResponse GetBounces() {
    RestClient client = new RestClient();
    client.BaseUrl = "https://api.mailgun.net/v2";
    client.Authenticator = new HttpBasicAuthenticator("api","key-3ax6xnjp29jd6fds4gc373sgvjxteol0");
    RestRequest request = new RestRequest();
    request.AddParameter("domain", "samples.mailgun.org", ParameterType.UrlSegment);
    request.Resource = "{domain}/bounces/{created_at}";
    return client.Execute(request);
    }

谢谢

2 个答案:

答案 0 :(得分:0)

不直接,您需要获取整个对象,该对象返回其体内反弹的时间日期,然后迭代地提取它

GET /<domain>/bounces

相关:http://documentation.mailgun.com/api-bounces.html#bounces

答案 1 :(得分:0)

对于最新版本,请使用events API。对于超过30天的事情,您真的只需要抑制API。