我使用 curl 和 Postmark 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"}
似乎一切正常。但是接收者什么也没有收到。
提前致谢,