0
我遇到了一個問題,如何從mailgun api獲取郵件內容。
我使用mailgun事件API(https://documentation.mailgun.com/user_manual.html#events),我成功地得到事件日誌。
像
{
"items": [
{
"tags": [],
"timestamp": 1376325780.160809,
"envelope": {
"sender": "[email protected]",
"transport": ""
},
"event": "accepted",
"campaigns": [],
"user-variables": {},
"flags": {
"is-authenticated": true,
"is-test-mode": false
},
"message": {
"headers": {
"to": "[email protected]",
"message-id": "[email protected]",
"from": "Excited User <[email protected]>",
"subject": "Hello"
},
"attachments": [],
"recipients": [
"[email protected]"
],
"size": 69
},
"recipient": "[email protected]",
"method": "http"
}
],
"paging": {
"next":
"https://api.mailgun.net/v3/samples.mailgun.org/events/W3siY...",
"previous":
"https://api.mailgun.net/v3/samples.mailgun.org/events/Lkawm..."
}
}
返回數據,但問題是,事件日誌未包含電子郵件內容(僅須從,到...)。
如何獲取電子郵件內容?
有人能給我一個例子嗎?
謝謝!
感謝您的回覆。我從這個博客得到了答案。 http://blog.mailgun.com/how-to-view-your-messages/ – timlentse