通过邮戳API发送的电子邮件发送正常,但未收到收据



我使用 curl 和邮戳 API 发送电子邮件:

 curl "https://api.postmarkapp.com/email" 
 -X POST 
 -H "Accept: application/json" 
 -H "Content-Type: application/json" 
 -H "X-Postmark-Server-Token: server token" 
 -d "{From: 'sender@example.com', To: 'receiver@example.com', Subject:        'Postmark test', HtmlBody: '<html><body><strong>Hello</strong> dear   Postmark user.</body></html>'}"

我使用我的服务器令牌、自定义发送方和接收方。我给我这个信息:

{"To":"receiver@example.com","SubmittedAt":"2017-06-29T08:27:49.1227844-04:00","MessageID":"a3c4b03d-56db-4085-913a-47c047c14216","ErrorCode":0,"Message":"OK"}

似乎一切都很好。但是接收者没有收到任何东西。

提前感谢,

尝试使用Postmark的API来查找邮件的详细信息。

curl "https://api.postmarkapp.com/messages/outbound/a3c4b03d-56db-4085-913a-47c047c14216/details" 
  -X GET 
  -H "Accept: application/json" 
  -H "X-Postmark-Server-Token: server token"

您将获得一个如下所示的 JSON 对象:

{
   "HtmlBody":"<html><body><strong>Hello</strong> dear   Postmark user.</body></html>",
   "MessageID":"a3c4b03d-56db-4085-913a-47c047c14216",
   "MessageStream":"outbound",
   "To":[
      {
         "Email":"receiver@example.com",
         "Name":""
      }
   "Recipients":[
      "receiver@example.com"
   ],
   "ReceivedAt":"2023-09-08T13:25:48-04:00",
   "From":"<sender@example.com>",
   "Subject":"Postmark test",
   "Status":"Sent",
   "Sandboxed":false,
   "MessageEvents":[
      {
         "Recipient":"receiver@example.com",
         "Type":"Delivered",
         "ReceivedAt":"2023-09-08T13:25:48.0000000-04:00"
      }
   ]
}

检查是否存在以下键/值对:

  • "Status":"Sent"
  • "Sandboxed":false
  • "Type":"Delivered"

如果值完全匹配,则问题出在接收域上。
如果没有,希望该值能为您提供有关该问题的一些线索。

相关内容

  • 没有找到相关文章

最新更新