From 71aa5d9ab2fd32cf2432e6f3771bb4c335a21268 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Tue, 15 Oct 2013 16:54:11 -0700 Subject: [PATCH] Created REST GET message source (markdown) --- REST-GET-message-source.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 REST-GET-message-source.md diff --git a/REST-GET-message-source.md b/REST-GET-message-source.md new file mode 100644 index 0000000..599ec7a --- /dev/null +++ b/REST-GET-message-source.md @@ -0,0 +1,33 @@ +### URI + +`GET /mailbox/{name}/{id}/source` + +### Params + +* `name` - name of the mailbox to list the contents of +* `id` - identifier of the message to retrieve + +### Output + +Plain text dump of the message headers and body in SMTP format. + +### Example + +Request: `curl -i -H "Accept: application/json" http://localhost:9000/mailbox/swaks/20131015T161202-0000/source` + +Response: + + HTTP/1.1 200 OK + Content-Type: text/plain + Content-Length: 264 + Date: Tue, 15 Oct 2013 23:52:09 GMT + + Date: Tue, 15 Oct 2013 16:12:02 -0700 + To: swaks@inbucket.local + From: jamehi03@server.com + Subject: Swaks Plain Text + X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/ + + This is a test mailing. + + This should be clickable: http://google.com/