{"_id":"56b4f6925f1cf00d00cc4704","__v":23,"user":"5582e90181672a3900bb4fc7","project":"569f9cf6650e1d1900f96b5b","version":{"_id":"569f9cf6650e1d1900f96b5e","project":"569f9cf6650e1d1900f96b5b","__v":12,"createdAt":"2016-01-20T14:43:02.785Z","releaseDate":"2016-01-20T14:43:02.785Z","categories":["569f9cf7650e1d1900f96b5f","56abdd81d4432d1900eed235","56abe0558beeff0d003b8118","56ad2f8b1c09150d00a183a8","56ad4e1cd21f1b0d00fd2f97","56b00ad88f7a4f0d0029dc92","56b2432e9621f20d00efb2bd","56b25826147e900d00d6497a","56b7af2a4b372d2100722c48","56b8c4d938b1070d0028920f","56b8cdab14feef0d0082415d","58599813cf9e112d0032cdab"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"56b25826147e900d00d6497a","project":"569f9cf6650e1d1900f96b5b","version":"569f9cf6650e1d1900f96b5e","pages":["56b2583a9621f20d00efb31c","56b25a3965ddf50d0076baa2","56b2738894ab060d0006743c","56b4d1cf5f1cf00d00cc46d7","56b4f4e2b1a8690d00a59369","56b4f6925f1cf00d00cc4704","56b4fa3d5997532100bc6bcc","56b50ba8eed075230097d71e","56b5123585a6922300d1c506","56b51e475997532100bc6c08","56b5220b7719bb1900143055","56b524cc3d5f130d00dad1b8","56b5265b168b5c1700c15996","56b774438fb4420d006a618b","56b78012eb783a0d007894f3","56b78292a6c10c0d00a2d65d","56b7863aeb783a0d007894f8","56b78f68a6c10c0d00a2d66b","56b794566c2a240d0094ae8a","56b7a85dd22adc0d0053f4c2","56b7ac118fb4420d006a61b7"],"__v":21,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-03T19:42:30.051Z","from_sync":false,"order":7,"slug":"user-methods","title":"User methods"},"githubsync":"","parentDoc":null,"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-02-05T19:22:58.539Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[]},"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"## Syntax \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n   <credentials object>,\\n   \\\"user\\\": <mailbox_name>, \\n   \\\"folder\\\": <folder name>, \\n   \\\"headers\\\": [<list of headers>]\\n}\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Request fields for get_deleted_messages\"\n}\n[/block]\nThe following fields can be used in the **get_deleted_messages** method:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Definition/Value\",\n    \"0-0\": \"folder\",\n    \"0-1\": \"Optional\",\n    \"0-2\": \"Name of the folder to search. You can specify deleted as well as current folders. If not specified, messages in all folders will be returned.\",\n    \"1-0\": \"headers\",\n    \"1-1\": \"Optional\",\n    \"1-2\": \"Specify the headers that you want returned. For a list of the available headers, see **Response fields\\nfor get_deleted_messages** below. If not specified, all headers are returned.\",\n    \"2-0\": \"user\",\n    \"2-1\": \"Required\",\n    \"2-2\": \"The user whose deleted messages you want to list.\"\n  },\n  \"cols\": 3,\n  \"rows\": 3\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response fields for get_deleted_messages\"\n}\n[/block]\nThe following fields may be returned in response to the **get_deleted_messages** method:\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Field name\",\n    \"h-1\": \"Obligation\",\n    \"h-2\": \"Description/Value\",\n    \"0-0\": \"count\",\n    \"0-1\": \"Returned if **success = true**\",\n    \"0-2\": \"The number of messages that can be restored.\",\n    \"1-0\": \"error\",\n    \"1-1\": \"Returned if **success = false**\",\n    \"1-2\": \"A text string that explains the error.\",\n    \"2-0\": \"error_number\",\n    \"2-1\": \"Returned if **success = false**\",\n    \"2-2\": \"A number that represents the error.\",\n    \"3-0\": \"messages\",\n    \"3-1\": \"Returned if **success = true**\",\n    \"3-2\": \"A list of the messages that can be recovered. For each message listed, the following information is returned:\\n\\n  * **folder** — The IMAP name of the folder to which the message belongs.\\n\\n  * **folder_deleted** —                    Indicates that the folder that the message was in is a deleted folder. This is only returned if the folder was deleted.\\n\\n  * **folder-unicode** — The displayed name of the folder to which the message belongs.\\n\\n  * **headers** — The contents of the message header;; may include the following: **content-type, content-transfer- encoding, date, delivered-to, from, id, INTERNALDATE, message-id, mime_version, received, return- path, subject, to, x-fda, x-filterd- recvd-size, x-mailer, x-originating- ip, x-panda, x-session-marker**, and **x- spam-summary**. \\n\\n**Note:** The id value is used by the [restore_deleted_messages](https://api-opensrs-email.readme.io/v1.0/docs/restore_deleted_contacts?bypass=8272e34bb5) method to restore the message.\",\n    \"4-0\": \"success\",\n    \"4-1\": \"Always returned\",\n    \"4-2\": \"Indicates whether the request was successful or not. Allowed values are **true** and **false**.\"\n  },\n  \"cols\": 3,\n  \"rows\": 5\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Examples for get_deleted_messages\"\n}\n[/block]\n## Example 1\n\nRetrieves deleted recoverable messages for joe_user:::at:::example.com.\n\n**Request** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"credentials\\\": {\\n    \\\"user\\\": \\\"domain_admin@example.com\\\", \\n    \\\"password\\\": \\\"sw0rdf1sh\\\"\\n  },\\n  \\\"user\\\": \\\"joe_user@example.com\\\",\\n}\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n**Response** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\": true,\\n  \\\"count\\\": 6\\n  \\\"messages\\\": [\\n    {\\n      \\\"headers\\\": {\\n        \\\"return-path\\\": [\\n          \\\"june_user@example.com\\\"\\n\\t\\t\\t\\t], \\n        \\\"date\\\": [\\n          \\\"Mon, 21 Nov 2011 21:14:50 +0000 (GMT)\\\"\\n        ],\\n        \\\"x-mailer\\\": [\\n          \\\"Webmail\\\"\\n        ],\\n        \\\"INTERNALDATE\\\": [\\n          1321910752\\n        ],\\n        \\\"content-type\\\": [\\n          \\\"text/html; charset=UTF-8\\\"\\n\\t\\t\\t\\t], \\n\\t\\t\\t\\t\\\"to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-originating-ip\\\": [\\n          \\\"[10.0.63.198]\\\"\\n\\t\\t\\t\\t], \\n\\t\\t\\t\\t\\\"from\\\": [\\n          \\\"June User <june_user@example.com>\\\"\\n        ],\\n        \\\"mime-version\\\": [\\n          \\\"1.0\\\" \\n        ],\\n        \\\"received\\\": [\\n\\t\\t\\t\\t\\t\\n          \\\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf16.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:51 +0000 (UTC)\\\",\\n\\n\\t\\t\\t\\t\\t\\\"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id 54A4919063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:51 +0000 (UTC)\\\",\\n\\n\\t\\t\\t\\t\\t\\\"from webmail01 (imap-ext [216.40.41.197])\\\",\\n\\t\\t\\t\\t\\t\\\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with \\nHTTP; Mon, 21 Nov 2011 21:14:50 +0000 (GMT)\\\"\\n        ],\\n        \\\"x-spam-summary\\\": [\\n        \\n        \\\"39,2.407,0,b00953cdef69ad05,d41d8cd98f00b204,june_user@examp le.com,joe_user@example.com,RULES_HIT:152:355:375:379:413:541:582:588:5 89:988:989:1152:1224:1260:1261:1311:1313:1314:1345:1437:1515:1516:1517: 1529:1534:1536:1569:1593:1594:1676:1699:1711:1714:1730:1747:1766:1792:2 393:2557:2559:2562:3138:3769:3865:3870:5007:6261:10004:10400:11658:1191 4,0,RBL:216.40.41.197:@wxample.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\\\"\\n        \\n        ],\\n        \\\"delivered-to\\\": [\\n          \\\"joe_user@example.com\\n        ],\\n        \\\"x-fda\\\": [\\n          \\\"65578185624.06\\\"\\n        ],\\n        \\\"subject\\\": [\\n          \\\"IMPORTANT!! Please read!!!\\\"\\n        ],\\n        \\\"\\\\t(authenticated sender\\\": [\\n\\\"june_user@example.com) by omf01.dev.hostedemail.com \\n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \\n21:14:51 +0000 (UTC)\\\"\\n        ],\\n        \\\"x-filterd-recvd-size\\\": [\\n\\t\\t\\t\\t\\t\\\"1260\\\",\\n\\t\\t\\t\\t\\\"748\\\" \\n        ],\\n        \\\"x-session-marker\\\": [ \\\"6A756E655F757365724064656D6F636F2E636F6D\\\"\\n        ],\\n        \\\"x-panda\\\": [\\n\\t\\t\\t\\t\\t\\\"scanned!\\\",\\n          \\\"scanned!\\\"\\n        ],\\n        \\\"content-transfer-encoding\\\": [\\n          \\\"7bit\\\"\\n        ],\\n        \\\"message-id\\\": [\\n\\t\\t\\t\\t\\t\\\"<507672317.5.1321910091140.JavaMail.mail@webmail01>\\\"\\n\\t\\t\\t\\t]\\n\\t\\t\\t},\\n      \\\"folder-unicode\\\": \\\"INBOX\\\",\\n\\t\\t\\t\\\"id\\\": \\\"U2FsdGVkX18rWbWomiloZWQML6UX9qBBsIn38D3Pzuimm3JW5Q4XC1xTdfHj5XEK0Zz2Dc 8VYUMrESVnn0LfaesVN/y34oTjmX0whWuqoSka5xhAE3ieCEDeDeKRR7m2ghBIBMGV9SNlr 7ORikncOl+cXabSVJyFnnsLysVuaxVX5WKctcDZZAd3YxRhp921\\\",\\n   \\t\\t\\\"folder\\\": \\\"INBOX\\\"\\n    },\\n    {\\n      \\\"headers\\\": {\\n        \\\"return-path\\\": [\\n          \\\"mrmanager@example.com\\\"\\n        ], \\n        \\\"date\\\": [\\n          \\\"Mon, 21 Nov 2011 21:16:36 +0000 (GMT)\\\"\\n        ],\\n        \\\"x-mailer\\\": [\\n          \\\"Webmail\\\"\\n        ],\\n        \\\"INTERNALDATE\\\": [\\n          1321910752\\n        ],\\n        \\\"content-type\\\": [\\n          \\\"text/html; charset=UTF-8\\\"\\n        ],\\n        \\\"to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-originating-ip\\\": [\\n          \\\"[10.0.63.198]\\\"\\n        ],\\n        \\\"from\\\": [\\n          \\\"Manager <mrmanager@example.com>\\\"\\n        ],\\n        \\\"mime-version\\\": [\\n\\t\\t\\t\\t\\t\\\"1.0\\\" \\n        ],\\n        \\\"received\\\": [\\n        \\n        \\t\\\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf27.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:16:37 +0000 (UTC)\\\",\\n          \\n          \\\"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id A209819063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:16:37 +0000 (UTC)\\\",\\n\\n\\t\\t\\t\\t\\t\\\"from webmail01 (imap-ext [216.40.41.197])\\\",\\n          \\n          \\\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with HTTP; \\t\\t\\t  Mon, 21 Nov 2011 21:16:36 +0000 (GMT)\\\"   \\n        ],\\n        \\\"x-spam-summary\\\": [\\n          \\\"1,0,0,565f950133a813c6,d41d8cd98f00b204,mrmanager@example.co m,joe_user@example.com,RULES_HIT:152:355:375:379:541:582:988:989:1152:1 224:1260:1261:1311:1313:1314:1345:1373:1515:1516:1517:1525:1534:1536:15 69:1593:1594:1676:1699:1711:1714:1730:1747:1766:1792:2393:2557:2559:256 2:3138:3769:3876:3877:5007:6114:6261:7901:10004:10400:11658:11914,0,RBL :216.40.41.197:@example.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\\\"\\n        ],\\n        \\\"delivered-to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-fda\\\": [\\n          \\\"65578190076.03\\\"\\n        ],\\n        \\\"subject\\\": [\\n\\t\\t\\t\\t\\t\\\"Please file your end of quarter reports by end of quarter\\\"\\n        ],\\n        \\\"\\\\t(authenticated sender\\\": [\\n          \\\"mrmanager@example.com) by omf01.dev.hostedemail.com \\n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \\n21:16:37 +0000 (UTC)\\\"\\n          ],\\n          \\\"x-filterd-recvd-size\\\": [\\n\\t\\t\\t\\t\\t\\t\\\"1266\\\",\\n\\t\\t\\t\\t\\t\\t\\\"754\\\" \\n          ],\\n\\t\\t\\t\\t\\t\\\"x-session-marker\\\": [ \\n          \\t\\\"6D726D616E616765724064656D6F636F2E636F6D\\\"\\n        ],\\n        \\\"x-panda\\\": [\\n\\t\\t\\t\\t\\t\\\"scanned!\\\",\\n          \\\"scanned!\\\"\\n        ],\\n        \\\"content-transfer-encoding\\\": [\\n          \\\"7bit\\\"\\n        ],\\n        \\\"message-id\\\": [\\n\\t\\t\\t\\t\\t\\\"<1371513603.7.1321910197378.JavaMail.mail@webmail01>\\\" \\n        ]\\n\\t\\t},\\n      \\\"folder-unicode\\\": \\\"INBOX\\\",\\n\\t\\t\\t\\\"id\\\":\\n\\\"U2FsdGVkX1+MQJC6Usm5VuOm34dPzFZgt2Emm1SU0Tj0uWUDbjzvEQUd/f+KKcMzMxZBbN 0zYwr7sXXV7buH0YdndTvu2+/Xg4gR1Fpitn6HUHLyhYnW+3y7brEWCT2a7duvqE7VKHpxA hpCQKjyV+H2gaVzQ/Jfn4LQl6NnfLL0cXU0IFClAkpxHMyABcoZ\\\",\\n\\t\\t\\t\\\"folder\\\": \\\"INBOX\\\"\\n    },\\n    {\\n      \\\"headers\\\": {\\n        \\\"return-path\\\": [\\n        \\\"june_user@example.com\\\"\\n      ],\\n      \\\"date\\\": [\\n          \\\"Mon, 21 Nov 2011 21:14:21 +0000 (GMT)\\\"\\n      ],\\n      \\\"x-mailer\\\": [\\n\\t\\t\\t\\t\\\"Webmail\\\" \\n      ],\\n      \\\"INTERNALDATE\\\": [\\n          1321910752\\n        ],\\n        \\\"content-type\\\": [\\n\\t\\t\\t\\t\\t\\\"multipart/mixed; boundary=\\\\\\\"---- \\n=_Part_3_280999237.1321910061210\\\\\\\"\\\"\\n\\t\\t\\t\\t], \\n        \\\"to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-originating-ip\\\": [\\n          \\\"[10.0.63.198]\\\"\\n\\t\\t\\t\\t], \\n\\t\\t\\t\\t\\\"from\\\": [\\n          \\\"June User <june_user@example.com>\\\"\\n        ],\\n        \\\"mime-version\\\": [\\n          \\\"1.0\\\"\\n        ],\\n        \\\"received\\\": [\\n\\t\\t\\t\\t\\t\\\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf25.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:24 +0000 (UTC)\\\",\\n          \\n          \\\"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id B447A19063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:22 +0000 (UTC)\\\",\\n          \\n          \\\"from webmail01 (imap-ext [216.40.41.197])\\\",\\n          \\n          \\\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with HTTP; \\t\\t\\t\\tMon, 21 Nov 2011 21:14:21 +0000 (GMT)\\\"\\n        ],\\n        \\\"x-spam-summary\\\": [\\n        \\t\\\"20,1.5,0,641aaf435ac40a11,d41d8cd98f00b204,june_user@example .com,joe_user@example.com,RULES_HIT:152:355:379:541:582:871:929:960:988 :989:1000:1152:1260:1261:1313:1314:1345:1373:1431:1437:1467:1516:1517:1 527:1536:1569:1575:1594:1676:1699:1711:1714:1730:1747:1764:1766:1792:21 94:2197:2199:2200:2375:2376:2393:2559:2562:2827:3138:3653:3867:3869:387 1:3873:4512:4513:4515:6119:6261:6353:6506:7281:7774:7874:7974:8957:9040 :9709:9913:10004:10400:10562:11604:11658:11914:11919:12043,0,RBL:216.40 .41.197:@example.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\\\"\\n        ],\\n        \\\"delivered-to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-fda\\\": [\\n          \\\"65578184490.04\\\"\\n        ],\\n        \\\"subject\\\": [\\n          \\\"Check out this cute pic!\\\"\\n        ],\\n        \\\"\\\\t(authenticated sender\\\": [\\n        \\t\\\"june_user@example.com) by omf01.dev.hostedemail.com \\n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \\n21:14:22 +0000 (UTC)\\\"\\n\\t\\t\\t\\t],\\n        \\\"x-filterd-recvd-size\\\": [\\n\\t\\t\\t\\t\\t\\\"141147\\\",\\n\\t\\t\\t\\t\\t\\\"140632\\\" \\n        ],\\n\\t\\t\\t\\t\\\"x-session-marker\\\": [ \\n        \\t\\\"6A756E655F757365724064656D6F636F2E636F6D\\\"\\n        ],\\n        \\\"x-panda\\\": [\\n\\t\\t\\t\\t\\t\\\"scanned!\\\",\\n          \\\"scanned!\\\"\\n        ],\\n\\t\\t\\t\\t\\\"message-id\\\": [ \\n        \\t\\\"<1001196937.4.1321910062338.JavaMail.mail@webmail01>\\\"\\n        \\t] \\n        },\\n        \\\"folder-unicode\\\": \\\"INBOX\\\",\\n\\t\\t\\t\\t\\\"id\\\": \\\"U2FsdGVkX19oytJqrlnvKvM0y0E6rbv65exFb6K8fTwgq7PG3ihw0y74AttSiEPCpDic+E Ez4+BkGi7mAXWBqEsIqIfh7zQukN9nlUEoX+T73lLDprLjPHGMFjmgsYHc/MF2F8ufYAQi/ GNy99+iQGQkUPmCTvE4jwpoT/LprjJY87beSHTLqI4KY3g4zJ/u8xNVF3/ywdg=\\\",\\n      \\\"folder\\\": \\\"INBOX\\\"\\n    },\\n    {\\n      \\\"headers\\\": {\\n        \\\"return-path\\\": [\\n          \\\"june_user@example.com\\\"\\n\\t\\t\\t\\t], \\n        \\\"date\\\": [\\n          \\\"Mon, 21 Nov 2011 21:15:24 +0000 (GMT)\\\"\\n        ],\\n        \\\"x-mailer\\\": [\\n          \\\"Webmail\\\"\\n        ],\\n        \\\"INTERNALDATE\\\": [\\n          1321910752\\n        ],\\n        \\\"content-type\\\": [\\n          \\\"text/html; charset=UTF-8\\\"\\n\\t\\t\\t\\t], \\n        \\\"to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-originating-ip\\\": [\\n          \\\"[10.0.63.198]\\\"\\n\\t\\t\\t\\t], \\n        \\\"from\\\": [\\n          \\\"June User <june_user@example.com>\\\"\\n        ],\\n        \\\"mime-version\\\": [\\n        \\t\\\"1.0\\\"\\n          ],\\n        \\\"received\\\": [\\n\\t\\t\\t\\t\\\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf25.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:15:26 +0000 (UTC)\\\",\\n\\t\\t\\t\\t\\\"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id AC9CF19063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:15:25 +0000 (UTC)\\\",\\n\\t\\t\\t\\t\\\"from webmail01 (imap-ext [216.40.41.197])\\\",\\n\\t\\t\\t\\t\\\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with \\nHTTP; Mon, 21 Nov 2011 21:15:24 +0000 (GMT)\\\"\\n\\t\\t\\t\\t],\\n        \\\"x-spam-summary\\\": [\\n          \\\"1,0,0,5058f1af8388633f,d41d8cd98f00b204,june_user@example.co m,joe_user@example.com,RULES_HIT:152:355:375:379:541:582:988:989:1152:1 224:1260:1261:1311:1313:1314:1345:1373:1515:1516:1517:1523:1534:1536:15 69:1593:1594:1676:1699:1711:1714:1730:1747:1766:1792:2393:2559:2562:313 8:3876:3877:5007:6114:6261:10004:10400:11658:11914,0,RBL:216.40.41.197: @example.com:.lbl8.mailshell.net-64.201.201.201 62.8.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache :0,MSF:not bulk,SPF:fn,MSBL:none,DNSBL:none,Custom_rules:0:0:0\\\"\\n        ],\\n        \\\"delivered-to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-fda\\\": [\\n          \\\"65578187052.05\\\"\\n        ],\\n        \\\"subject\\\": [\\n          \\\"Have you signed up for the Spring Party yet?\\\"\\n        ],\\n        \\\"\\\\t(authenticated sender\\\": [\\n\\t\\t\\t\\t\\t\\\"june_user@example.com) by omf01.dev.hostedemail.com \\n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \\n21:15:25 +0000 (UTC)\\\"\\n\\t\\t\\t\\t],\\n        \\\"x-filterd-recvd-size\\\": [\\n\\t\\t\\t\\t\\t\\\"1233\\\",\\n\\t\\t\\t\\t\\t\\\"721\\\" \\n        ],\\n        \\\"x-session-marker\\\": [ \\n        \\t\\\"6A756E655F757365724064656D6F636F2E636F6D\\\"\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\\"x-panda\\\": [\\n\\t\\t\\t\\t\\t\\\"scanned!\\\",\\n  \\t\\t\\t\\t\\\"scanned!\\\"\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\\"content-transfer-encoding\\\": [\\n  \\t\\t\\t\\t\\\"7bit\\\"\\n\\t\\t\\t\\t],\\n\\t\\t\\t\\t\\\"message-id\\\": [\\n\\t\\t\\t\\t\\t\\\"<1436882877.6.1321910125526.JavaMail.mail@webmail01>\\\" \\n        ]\\n\\t\\t\\t},\\n      \\\"folder-unicode\\\": \\\"INBOX\\\",\\n\\t\\t\\t\\\"id\\\": \\\"U2FsdGVkX1+cUef21BEodmVA2lgDHINRlgKL8VnxpMcr3McPwNr9ifXtXCekoSn1AdEZW4 eoNS77iHJ4tdv8by/CgqDSdNqDS+cATjXbXEkxR2kcr63X7+1d/4xOM0ldmbcSJ0DcZas3F ipc9aJdAMwUxqUyPfhiFHFnhGAmBoy7S8KKHkS/2TxQ9Ic50XX7\\\",\\n\\\"folder\\\": \\\"INBOX\\\"\\n\\t\\t},\\n    {\\n      \\\"headers\\\": {\\n        \\\"date\\\": [\\n          \\\"Tue, 22 Nov 2011 19:00:56 +0000 (GMT)\\\"\\n        ],\\n        \\\"subject\\\": [\\n          \\\"Re: Banannanannananananana\\\"\\n        ],\\n        \\\"x-mailer\\\": [\\n          \\\"Webmail\\\"\\n        ],\\n        \\\"content-transfer-encoding\\\": [\\n\\t\\t\\t\\t\\t\\\"7bit\\\" \\n        ],\\n        \\\"INTERNALDATE\\\": [\\n          1321988456\\n        ],\\n        \\\"content-type\\\": [\\n          \\\"text/html; charset=UTF-8\\\"\\n\\t\\t\\t\\t], \\n        \\\"to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-originating-ip\\\": [\\n          \\\"[10.0.63.197]\\\"\\n\\t\\t\\t\\t], \\n        \\\"cc\\\": [\\n          \\\"richard.platel@gmail.com, rplatel@example.com, richard.platel+moo@gmail.com, richard.platel+xoo@gmail.com, richard.platel+poo@gmail.com\\\"\\n        ],\\n        \\\"references\\\": [\\n\\t\\t\\t\\t\\t\\\"<1968605354.270.1321988431729.JavaMail.mail@webmail01>\\\" \\n        ],\\n        \\\"from\\\": [\\n          \\\"Joseph User <joe_user@example.com>\\\"\\n        ],\\n        \\\"mime-version\\\": [\\n\\t\\t\\t\\t\\t\\\"1.0\\\" ],\\n        \\\"received\\\": [\\n\\t\\t\\t\\t\\t\\\"from 10.0.63.197 ([10.0.63.197]) by webmail01 (Webmail) with \\n HTTP; Tue, 22 Nov 2011 19:00:56 +0000 (GMT)\\\"\\n        ],\\n        \\\"message-id\\\": [\\n\\t\\t\\t\\t\\t\\\"<2130206675.272.1321988456313.JavaMail.mail@webmail01>\\\" \\n        ]\\n\\t\\t\\t},\\n      \\\"folder-unicode\\\": \\\"Sent Items\\\",\\n\\t\\t\\t\\\"id\\\": \\\"U2FsdGVkX18pR0nXIwiJ34Pi7tCBsFdZQ+hna2Hb5yEf1iegElKHugPC1MZJgvS6ADSJE2 CJMrRA9WC+8ULKL+/z5eX4GWH0qG5j3TZKRQQcFLCDYQs1RATePrCzKRye2PBz8CPJEnB+o HyLS4aexStXKq8UVs5tDPHW+fxAWlALhZrQpnzBw5SVknqvkJhQIxE6GZBwGBQ=\\\",\\n      \\\"folder\\\": \\\"Sent Items\\\"\\n    },\\n    {\\n      \\\"headers\\\": {\\n        \\\"return-path\\\": [\\n          \\\"june_user@example.com\\\"\\n\\t\\t\\t\\t], \\n        \\\"date\\\": [\\n          \\\"Mon, 21 Nov 2011 21:14:21 +0000 (GMT)\\\"\\n        ],\\n        \\\"x-mailer\\\": [\\n          \\\"Webmail\\\"\\n        ],\\n        \\\"INTERNALDATE\\\": [\\n          1321910752\\n        ],\\n        \\\"content-type\\\": [\\n\\t\\t\\t\\t\\t\\\"multipart/mixed; boundary=\\\\\\\"---- \\n=_Part_3_280999237.1321910061210\\\\\\\"\\\"\\n\\t\\t\\t\\t], \\\"to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-originating-ip\\\": [\\n          \\\"[10.0.63.198]\\\"\\n\\t\\t\\t\\t], \\\"from\\\": [\\n          \\\"June User <june_user@example.com>\\\"\\n        \\\"mime-version\\\": [\\n\\t\\t\\t\\t\\t\\\"1.0\\\" ],\\n        \\\"received\\\": [\\n\\t\\t\\t\\t\\t\\\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf25.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:24 +0000 (UTC)\\\",\\n          \\\"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id B447A19063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:22 +0000 (UTC)\\\",\\n\\t\\t\\t\\t\\\"from webmail01 (imap-ext [216.40.41.197])\\\",\\n\\t\\t\\t\\t\\\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with \\nHTTP; Mon, 21 Nov 2011 21:14:21 +0000 (GMT)\\\"\\n        ],\\n        \\\"x-spam-summary\\\": [\\n          \\\"20,1.5,0,641aaf435ac40a11,d41d8cd98f00b204,june_user@example .com,joe_user@example.com,RULES_HIT:152:355:379:541:582:871:929:960:988 :989:1000:1152:1260:1261:1313:1314:1345:1373:1431:1437:1467:1516:1517:1 527:1536:1569:1575:1594:1676:1699:1711:1714:1730:1747:1764:1766:1792:21 94:2197:2199:2200:2375:2376:2393:2559:2562:2827:3138:3653:3867:3869:387 1:3873:4512:4513:4515:6119:6261:6353:6506:7281:7774:7874:7974:8957:9040 :9709:9913:10004:10400:10562:11604:11658:11914:11919:12043,0,RBL:216.40 .41.197:@example.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\\\"\\n          ],\\n        \\\"delivered-to\\\": [\\n          \\\"joe_user@example.com\\\"\\n        ],\\n        \\\"x-fda\\\": [\\n          \\\"65578184490.04\\\"\\n        ],\\n        \\\"subject\\\": [\\n          \\\"Check out this cute pic!\\\"\\n        ],\\n        \\\"\\\\t(authenticated sender\\\": [\\n\\t\\t\\t\\t\\t\\\"june_user@example.com) by omf01.dev.hostedemail.com \\n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \\n21:14:22 +0000 (UTC)\\\"\\n        ],\\n        \\\"x-filterd-recvd-size\\\": [\\n\\t\\t\\t\\t\\t\\\"141147\\\",\\n\\t\\t\\t\\t\\t\\\"140632\\\" \\n        ],\\n\\t\\t\\t\\t\\\"x-session-marker\\\": [ \\\"6A756E655F757365724064656D6F636F2E636F6D\\\"\\n        ],\\n        \\\"x-panda\\\": [\\n        \\t\\\"scanned!\\\",\\n          \\\"scanned!\\\"\\n        ],\\n\\t\\t\\t\\t\\\"message-id\\\": [ \\n        \\t\\\"<1001196937.4.1321910062338.JavaMail.mail@webmail01>\\\"\\n\\t\\t\\t\\t] \\n\\t\\t\\t},\\n      \\\"folder-unicode\\\": \\\"plus ça change\\\",\\n      \\\"id\\\": \\\"U2FsdGVkX1+FRyKE8mqxWO7BCySwid3bBxSx8Yy0ro+Ss/1n5PIdD/jylUTBhjAbxzItec P5yCwChiZKxZyQ1n9bcicRxAWh7Cr6FYCV80y1w9BjpJoJxPdo9sa/jbUvQnGdbKGzaTqgR VqcFFfhcgM7/WBFFfc6gEBe+apdt602KqtHBBnACis3FWL0LJq6hXGDhTF2wg2QWJzrbG2q BW6nAkfduj2z\\\",\\n      \\\"folder\\\": \\\"plus &AOc-a change\\\"\\n    }\\n  ], \\n}\\n        \",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n## Example 2\n\nRetrieves messages with specific headers.\n\n**Request** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"credentials\\\": {\\n    \\\"user\\\": \\\"domain_admin@example.com\\\",\\n    \\\"password\\\": \\\"pencil75\\\"\\n  },\\n  \\\"user\\\": \\\"joe_user@example.com\\\",\\n  \\\"headers\\\": [\\n    \\\"subject\\\",\\n    \\\"from\\\" \\n  ]\\n}\",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]\n**Response** \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"success\\\": true,\\n  \\\"count\\\": 3\\n  \\\"messages\\\": [\\n    {\\n      \\\"headers\\\": {\\n        \\\"INTERNALDATE\\\": [\\n          1321910752\\n        ],\\n        \\\"from\\\": [\\n          \\\"June User <june_user@example.com>\\\"\\n        ],\\n        \\\"subject\\\": [\\n          \\\"IMPORTANT!! Please read!!!\\\"\\n        ]\\n\\t\\t\\t},\\n      \\\"folder-unicode\\\": \\\"INBOX\\\",\\n      \\\"id\\\": \\\"U2FsdGVkX1+OFA3m95RbsYdxH4EFoUGa2DUr8Zg+G+8hvH53T/RzR6hEBwIGfrSkfNadTQ TR2nb/OsRk9oBp01+/oUYKciim5sU1SI/k2uMed2tgyZtH7W4SY3UBMa17I+FQYGx/owSvx gjrYZHZQkiExpah6x5YaKqkkpH5CmXLKHvWGHjZNF28agK0KP0V\\\",\\n      \\\"folder\\\": \\\"INBOX\\\"\\n    },\\n    {\\n      \\\"headers\\\": {\\n        \\\"INTERNALDATE\\\": [\\n          1321910752\\n\\t\\t\\t], \\n      \\\"from\\\": [\\n         \\\"June User <june_user@example.com>\\\"\\n      ],\\n      \\\"subject\\\": [\\n          \\\"Have you signed up for the Spring Party yet?\\\"\\n\\t\\t\\t] \\n    },\\n    \\\"folder-unicode\\\": \\\"INBOX\\\",\\n\\t\\t\\\"id\\\":\\n\\\"U2FsdGVkX1+T0SHk/WSnTKkpVxHwTwtmJlz2mAf+bk8itlX7tHnbIJfi40EO5siFsOj98f Sz/qXdr/dQzvOrYs4fQpl0Juo76TQrKDfb1EGuYO79Rw2smAWA57DHKzizgbvEOdiBkSE9z f/HnZnh8hgTV4vQ8eYJ6JYza9PGbQ2c/Ox0TiY6Yb8yN/HmKURj\\\",\\n\\t\\t  \\\"folder\\\": \\\"INBOX\\\"\\n      }, \\n      {\\n\\t\\t\\t\\\"headers\\\": {\\n  \\t\\t\\t\\\"INTERNALDATE\\\": [\\n    \\t\\t\\t1321910752\\n  \\t\\t\\t],\\n  \\t\\t\\t\\\"from\\\": [\\n    \\t\\t\\t\\\"Manager <mrmanager@example.com>\\\"\\n  \\t\\t\\t],\\n  \\t\\t\\t\\\"subject\\\": [\\n\\t\\t\\t\\t\\t\\\"Please file your end of quarter reports by end of quarter\\\" \\n        ]\\n\\t\\t\\t},\\n      \\\"folder-unicode\\\": \\\"INBOX\\\",\\n      \\\"id\\\": \\\"U2FsdGVkX1+TadnPrnXWEz0gB2x1rcV6ZrlND3+U4gnpAkXGh6LiT0E9L6GLDgNq85Vf/r XJ6Ka1l1DsfPT4qChnyV+9uqbJSRWzZC26h2Ajg+RK+lObcn6f23Cfyj+8sqQz07ikmfI4t vVl5RImJjC7QPthdtYmxcbRhH+fjVPcOz/RbknRhcz/KeDJsYiD\\\",\\n       \\\"folder\\\": \\\"INBOX\\\"\\n    }\\n\\t], \\n}\\n      \",\n      \"language\": \"perl\",\n      \"name\": \"  \"\n    }\n  ]\n}\n[/block]","excerpt":"The **get_deleted_messages** method retrieves a list of recoverable deleted email messages belonging to a user.\n\nAfter they are deleted, email messages are retained for a period of time and may be recovered. This method returns a list of recoverable messages, including the message headers, so that a user can select which messages they want recovered.","slug":"get_deleted_messages","type":"basic","title":"get_deleted_messages"}

get_deleted_messages

The **get_deleted_messages** method retrieves a list of recoverable deleted email messages belonging to a user. After they are deleted, email messages are retained for a period of time and may be recovered. This method returns a list of recoverable messages, including the message headers, so that a user can select which messages they want recovered.

## Syntax [block:code] { "codes": [ { "code": "{\n <credentials object>,\n \"user\": <mailbox_name>, \n \"folder\": <folder name>, \n \"headers\": [<list of headers>]\n}", "language": "perl", "name": " " } ] } [/block] [block:api-header] { "type": "basic", "title": "Request fields for get_deleted_messages" } [/block] The following fields can be used in the **get_deleted_messages** method: [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Definition/Value", "0-0": "folder", "0-1": "Optional", "0-2": "Name of the folder to search. You can specify deleted as well as current folders. If not specified, messages in all folders will be returned.", "1-0": "headers", "1-1": "Optional", "1-2": "Specify the headers that you want returned. For a list of the available headers, see **Response fields\nfor get_deleted_messages** below. If not specified, all headers are returned.", "2-0": "user", "2-1": "Required", "2-2": "The user whose deleted messages you want to list." }, "cols": 3, "rows": 3 } [/block] [block:api-header] { "type": "basic", "title": "Response fields for get_deleted_messages" } [/block] The following fields may be returned in response to the **get_deleted_messages** method: [block:parameters] { "data": { "h-0": "Field name", "h-1": "Obligation", "h-2": "Description/Value", "0-0": "count", "0-1": "Returned if **success = true**", "0-2": "The number of messages that can be restored.", "1-0": "error", "1-1": "Returned if **success = false**", "1-2": "A text string that explains the error.", "2-0": "error_number", "2-1": "Returned if **success = false**", "2-2": "A number that represents the error.", "3-0": "messages", "3-1": "Returned if **success = true**", "3-2": "A list of the messages that can be recovered. For each message listed, the following information is returned:\n\n * **folder** — The IMAP name of the folder to which the message belongs.\n\n * **folder_deleted** — Indicates that the folder that the message was in is a deleted folder. This is only returned if the folder was deleted.\n\n * **folder-unicode** — The displayed name of the folder to which the message belongs.\n\n * **headers** — The contents of the message header;; may include the following: **content-type, content-transfer- encoding, date, delivered-to, from, id, INTERNALDATE, message-id, mime_version, received, return- path, subject, to, x-fda, x-filterd- recvd-size, x-mailer, x-originating- ip, x-panda, x-session-marker**, and **x- spam-summary**. \n\n**Note:** The id value is used by the [restore_deleted_messages](https://api-opensrs-email.readme.io/v1.0/docs/restore_deleted_contacts?bypass=8272e34bb5) method to restore the message.", "4-0": "success", "4-1": "Always returned", "4-2": "Indicates whether the request was successful or not. Allowed values are **true** and **false**." }, "cols": 3, "rows": 5 } [/block] [block:api-header] { "type": "basic", "title": "Examples for get_deleted_messages" } [/block] ## Example 1 Retrieves deleted recoverable messages for joe_user@example.com. **Request** [block:code] { "codes": [ { "code": "{\n \"credentials\": {\n \"user\": \"domain_admin@example.com\", \n \"password\": \"sw0rdf1sh\"\n },\n \"user\": \"joe_user@example.com\",\n}", "language": "perl", "name": " " } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n \"success\": true,\n \"count\": 6\n \"messages\": [\n {\n \"headers\": {\n \"return-path\": [\n \"june_user@example.com\"\n\t\t\t\t], \n \"date\": [\n \"Mon, 21 Nov 2011 21:14:50 +0000 (GMT)\"\n ],\n \"x-mailer\": [\n \"Webmail\"\n ],\n \"INTERNALDATE\": [\n 1321910752\n ],\n \"content-type\": [\n \"text/html; charset=UTF-8\"\n\t\t\t\t], \n\t\t\t\t\"to\": [\n \"joe_user@example.com\"\n ],\n \"x-originating-ip\": [\n \"[10.0.63.198]\"\n\t\t\t\t], \n\t\t\t\t\"from\": [\n \"June User <june_user@example.com>\"\n ],\n \"mime-version\": [\n \"1.0\" \n ],\n \"received\": [\n\t\t\t\t\t\n \"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf16.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:51 +0000 (UTC)\",\n\n\t\t\t\t\t\"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id 54A4919063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:51 +0000 (UTC)\",\n\n\t\t\t\t\t\"from webmail01 (imap-ext [216.40.41.197])\",\n\t\t\t\t\t\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with \nHTTP; Mon, 21 Nov 2011 21:14:50 +0000 (GMT)\"\n ],\n \"x-spam-summary\": [\n \n \"39,2.407,0,b00953cdef69ad05,d41d8cd98f00b204,june_user@examp le.com,joe_user@example.com,RULES_HIT:152:355:375:379:413:541:582:588:5 89:988:989:1152:1224:1260:1261:1311:1313:1314:1345:1437:1515:1516:1517: 1529:1534:1536:1569:1593:1594:1676:1699:1711:1714:1730:1747:1766:1792:2 393:2557:2559:2562:3138:3769:3865:3870:5007:6261:10004:10400:11658:1191 4,0,RBL:216.40.41.197:@wxample.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\"\n \n ],\n \"delivered-to\": [\n \"joe_user@example.com\n ],\n \"x-fda\": [\n \"65578185624.06\"\n ],\n \"subject\": [\n \"IMPORTANT!! Please read!!!\"\n ],\n \"\\t(authenticated sender\": [\n\"june_user@example.com) by omf01.dev.hostedemail.com \n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \n21:14:51 +0000 (UTC)\"\n ],\n \"x-filterd-recvd-size\": [\n\t\t\t\t\t\"1260\",\n\t\t\t\t\"748\" \n ],\n \"x-session-marker\": [ \"6A756E655F757365724064656D6F636F2E636F6D\"\n ],\n \"x-panda\": [\n\t\t\t\t\t\"scanned!\",\n \"scanned!\"\n ],\n \"content-transfer-encoding\": [\n \"7bit\"\n ],\n \"message-id\": [\n\t\t\t\t\t\"<507672317.5.1321910091140.JavaMail.mail@webmail01>\"\n\t\t\t\t]\n\t\t\t},\n \"folder-unicode\": \"INBOX\",\n\t\t\t\"id\": \"U2FsdGVkX18rWbWomiloZWQML6UX9qBBsIn38D3Pzuimm3JW5Q4XC1xTdfHj5XEK0Zz2Dc 8VYUMrESVnn0LfaesVN/y34oTjmX0whWuqoSka5xhAE3ieCEDeDeKRR7m2ghBIBMGV9SNlr 7ORikncOl+cXabSVJyFnnsLysVuaxVX5WKctcDZZAd3YxRhp921\",\n \t\t\"folder\": \"INBOX\"\n },\n {\n \"headers\": {\n \"return-path\": [\n \"mrmanager@example.com\"\n ], \n \"date\": [\n \"Mon, 21 Nov 2011 21:16:36 +0000 (GMT)\"\n ],\n \"x-mailer\": [\n \"Webmail\"\n ],\n \"INTERNALDATE\": [\n 1321910752\n ],\n \"content-type\": [\n \"text/html; charset=UTF-8\"\n ],\n \"to\": [\n \"joe_user@example.com\"\n ],\n \"x-originating-ip\": [\n \"[10.0.63.198]\"\n ],\n \"from\": [\n \"Manager <mrmanager@example.com>\"\n ],\n \"mime-version\": [\n\t\t\t\t\t\"1.0\" \n ],\n \"received\": [\n \n \t\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf27.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:16:37 +0000 (UTC)\",\n \n \"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id A209819063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:16:37 +0000 (UTC)\",\n\n\t\t\t\t\t\"from webmail01 (imap-ext [216.40.41.197])\",\n \n \"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with HTTP; \t\t\t Mon, 21 Nov 2011 21:16:36 +0000 (GMT)\" \n ],\n \"x-spam-summary\": [\n \"1,0,0,565f950133a813c6,d41d8cd98f00b204,mrmanager@example.co m,joe_user@example.com,RULES_HIT:152:355:375:379:541:582:988:989:1152:1 224:1260:1261:1311:1313:1314:1345:1373:1515:1516:1517:1525:1534:1536:15 69:1593:1594:1676:1699:1711:1714:1730:1747:1766:1792:2393:2557:2559:256 2:3138:3769:3876:3877:5007:6114:6261:7901:10004:10400:11658:11914,0,RBL :216.40.41.197:@example.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\"\n ],\n \"delivered-to\": [\n \"joe_user@example.com\"\n ],\n \"x-fda\": [\n \"65578190076.03\"\n ],\n \"subject\": [\n\t\t\t\t\t\"Please file your end of quarter reports by end of quarter\"\n ],\n \"\\t(authenticated sender\": [\n \"mrmanager@example.com) by omf01.dev.hostedemail.com \n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \n21:16:37 +0000 (UTC)\"\n ],\n \"x-filterd-recvd-size\": [\n\t\t\t\t\t\t\"1266\",\n\t\t\t\t\t\t\"754\" \n ],\n\t\t\t\t\t\"x-session-marker\": [ \n \t\"6D726D616E616765724064656D6F636F2E636F6D\"\n ],\n \"x-panda\": [\n\t\t\t\t\t\"scanned!\",\n \"scanned!\"\n ],\n \"content-transfer-encoding\": [\n \"7bit\"\n ],\n \"message-id\": [\n\t\t\t\t\t\"<1371513603.7.1321910197378.JavaMail.mail@webmail01>\" \n ]\n\t\t},\n \"folder-unicode\": \"INBOX\",\n\t\t\t\"id\":\n\"U2FsdGVkX1+MQJC6Usm5VuOm34dPzFZgt2Emm1SU0Tj0uWUDbjzvEQUd/f+KKcMzMxZBbN 0zYwr7sXXV7buH0YdndTvu2+/Xg4gR1Fpitn6HUHLyhYnW+3y7brEWCT2a7duvqE7VKHpxA hpCQKjyV+H2gaVzQ/Jfn4LQl6NnfLL0cXU0IFClAkpxHMyABcoZ\",\n\t\t\t\"folder\": \"INBOX\"\n },\n {\n \"headers\": {\n \"return-path\": [\n \"june_user@example.com\"\n ],\n \"date\": [\n \"Mon, 21 Nov 2011 21:14:21 +0000 (GMT)\"\n ],\n \"x-mailer\": [\n\t\t\t\t\"Webmail\" \n ],\n \"INTERNALDATE\": [\n 1321910752\n ],\n \"content-type\": [\n\t\t\t\t\t\"multipart/mixed; boundary=\\\"---- \n=_Part_3_280999237.1321910061210\\\"\"\n\t\t\t\t], \n \"to\": [\n \"joe_user@example.com\"\n ],\n \"x-originating-ip\": [\n \"[10.0.63.198]\"\n\t\t\t\t], \n\t\t\t\t\"from\": [\n \"June User <june_user@example.com>\"\n ],\n \"mime-version\": [\n \"1.0\"\n ],\n \"received\": [\n\t\t\t\t\t\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf25.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:24 +0000 (UTC)\",\n \n \"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id B447A19063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:22 +0000 (UTC)\",\n \n \"from webmail01 (imap-ext [216.40.41.197])\",\n \n \"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with HTTP; \t\t\t\tMon, 21 Nov 2011 21:14:21 +0000 (GMT)\"\n ],\n \"x-spam-summary\": [\n \t\"20,1.5,0,641aaf435ac40a11,d41d8cd98f00b204,june_user@example .com,joe_user@example.com,RULES_HIT:152:355:379:541:582:871:929:960:988 :989:1000:1152:1260:1261:1313:1314:1345:1373:1431:1437:1467:1516:1517:1 527:1536:1569:1575:1594:1676:1699:1711:1714:1730:1747:1764:1766:1792:21 94:2197:2199:2200:2375:2376:2393:2559:2562:2827:3138:3653:3867:3869:387 1:3873:4512:4513:4515:6119:6261:6353:6506:7281:7774:7874:7974:8957:9040 :9709:9913:10004:10400:10562:11604:11658:11914:11919:12043,0,RBL:216.40 .41.197:@example.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\"\n ],\n \"delivered-to\": [\n \"joe_user@example.com\"\n ],\n \"x-fda\": [\n \"65578184490.04\"\n ],\n \"subject\": [\n \"Check out this cute pic!\"\n ],\n \"\\t(authenticated sender\": [\n \t\"june_user@example.com) by omf01.dev.hostedemail.com \n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \n21:14:22 +0000 (UTC)\"\n\t\t\t\t],\n \"x-filterd-recvd-size\": [\n\t\t\t\t\t\"141147\",\n\t\t\t\t\t\"140632\" \n ],\n\t\t\t\t\"x-session-marker\": [ \n \t\"6A756E655F757365724064656D6F636F2E636F6D\"\n ],\n \"x-panda\": [\n\t\t\t\t\t\"scanned!\",\n \"scanned!\"\n ],\n\t\t\t\t\"message-id\": [ \n \t\"<1001196937.4.1321910062338.JavaMail.mail@webmail01>\"\n \t] \n },\n \"folder-unicode\": \"INBOX\",\n\t\t\t\t\"id\": \"U2FsdGVkX19oytJqrlnvKvM0y0E6rbv65exFb6K8fTwgq7PG3ihw0y74AttSiEPCpDic+E Ez4+BkGi7mAXWBqEsIqIfh7zQukN9nlUEoX+T73lLDprLjPHGMFjmgsYHc/MF2F8ufYAQi/ GNy99+iQGQkUPmCTvE4jwpoT/LprjJY87beSHTLqI4KY3g4zJ/u8xNVF3/ywdg=\",\n \"folder\": \"INBOX\"\n },\n {\n \"headers\": {\n \"return-path\": [\n \"june_user@example.com\"\n\t\t\t\t], \n \"date\": [\n \"Mon, 21 Nov 2011 21:15:24 +0000 (GMT)\"\n ],\n \"x-mailer\": [\n \"Webmail\"\n ],\n \"INTERNALDATE\": [\n 1321910752\n ],\n \"content-type\": [\n \"text/html; charset=UTF-8\"\n\t\t\t\t], \n \"to\": [\n \"joe_user@example.com\"\n ],\n \"x-originating-ip\": [\n \"[10.0.63.198]\"\n\t\t\t\t], \n \"from\": [\n \"June User <june_user@example.com>\"\n ],\n \"mime-version\": [\n \t\"1.0\"\n ],\n \"received\": [\n\t\t\t\t\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf25.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:15:26 +0000 (UTC)\",\n\t\t\t\t\"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id AC9CF19063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:15:25 +0000 (UTC)\",\n\t\t\t\t\"from webmail01 (imap-ext [216.40.41.197])\",\n\t\t\t\t\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with \nHTTP; Mon, 21 Nov 2011 21:15:24 +0000 (GMT)\"\n\t\t\t\t],\n \"x-spam-summary\": [\n \"1,0,0,5058f1af8388633f,d41d8cd98f00b204,june_user@example.co m,joe_user@example.com,RULES_HIT:152:355:375:379:541:582:988:989:1152:1 224:1260:1261:1311:1313:1314:1345:1373:1515:1516:1517:1523:1534:1536:15 69:1593:1594:1676:1699:1711:1714:1730:1747:1766:1792:2393:2559:2562:313 8:3876:3877:5007:6114:6261:10004:10400:11658:11914,0,RBL:216.40.41.197: @example.com:.lbl8.mailshell.net-64.201.201.201 62.8.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache :0,MSF:not bulk,SPF:fn,MSBL:none,DNSBL:none,Custom_rules:0:0:0\"\n ],\n \"delivered-to\": [\n \"joe_user@example.com\"\n ],\n \"x-fda\": [\n \"65578187052.05\"\n ],\n \"subject\": [\n \"Have you signed up for the Spring Party yet?\"\n ],\n \"\\t(authenticated sender\": [\n\t\t\t\t\t\"june_user@example.com) by omf01.dev.hostedemail.com \n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \n21:15:25 +0000 (UTC)\"\n\t\t\t\t],\n \"x-filterd-recvd-size\": [\n\t\t\t\t\t\"1233\",\n\t\t\t\t\t\"721\" \n ],\n \"x-session-marker\": [ \n \t\"6A756E655F757365724064656D6F636F2E636F6D\"\n\t\t\t\t],\n\t\t\t\t\"x-panda\": [\n\t\t\t\t\t\"scanned!\",\n \t\t\t\t\"scanned!\"\n\t\t\t\t],\n\t\t\t\t\"content-transfer-encoding\": [\n \t\t\t\t\"7bit\"\n\t\t\t\t],\n\t\t\t\t\"message-id\": [\n\t\t\t\t\t\"<1436882877.6.1321910125526.JavaMail.mail@webmail01>\" \n ]\n\t\t\t},\n \"folder-unicode\": \"INBOX\",\n\t\t\t\"id\": \"U2FsdGVkX1+cUef21BEodmVA2lgDHINRlgKL8VnxpMcr3McPwNr9ifXtXCekoSn1AdEZW4 eoNS77iHJ4tdv8by/CgqDSdNqDS+cATjXbXEkxR2kcr63X7+1d/4xOM0ldmbcSJ0DcZas3F ipc9aJdAMwUxqUyPfhiFHFnhGAmBoy7S8KKHkS/2TxQ9Ic50XX7\",\n\"folder\": \"INBOX\"\n\t\t},\n {\n \"headers\": {\n \"date\": [\n \"Tue, 22 Nov 2011 19:00:56 +0000 (GMT)\"\n ],\n \"subject\": [\n \"Re: Banannanannananananana\"\n ],\n \"x-mailer\": [\n \"Webmail\"\n ],\n \"content-transfer-encoding\": [\n\t\t\t\t\t\"7bit\" \n ],\n \"INTERNALDATE\": [\n 1321988456\n ],\n \"content-type\": [\n \"text/html; charset=UTF-8\"\n\t\t\t\t], \n \"to\": [\n \"joe_user@example.com\"\n ],\n \"x-originating-ip\": [\n \"[10.0.63.197]\"\n\t\t\t\t], \n \"cc\": [\n \"richard.platel@gmail.com, rplatel@example.com, richard.platel+moo@gmail.com, richard.platel+xoo@gmail.com, richard.platel+poo@gmail.com\"\n ],\n \"references\": [\n\t\t\t\t\t\"<1968605354.270.1321988431729.JavaMail.mail@webmail01>\" \n ],\n \"from\": [\n \"Joseph User <joe_user@example.com>\"\n ],\n \"mime-version\": [\n\t\t\t\t\t\"1.0\" ],\n \"received\": [\n\t\t\t\t\t\"from 10.0.63.197 ([10.0.63.197]) by webmail01 (Webmail) with \n HTTP; Tue, 22 Nov 2011 19:00:56 +0000 (GMT)\"\n ],\n \"message-id\": [\n\t\t\t\t\t\"<2130206675.272.1321988456313.JavaMail.mail@webmail01>\" \n ]\n\t\t\t},\n \"folder-unicode\": \"Sent Items\",\n\t\t\t\"id\": \"U2FsdGVkX18pR0nXIwiJ34Pi7tCBsFdZQ+hna2Hb5yEf1iegElKHugPC1MZJgvS6ADSJE2 CJMrRA9WC+8ULKL+/z5eX4GWH0qG5j3TZKRQQcFLCDYQs1RATePrCzKRye2PBz8CPJEnB+o HyLS4aexStXKq8UVs5tDPHW+fxAWlALhZrQpnzBw5SVknqvkJhQIxE6GZBwGBQ=\",\n \"folder\": \"Sent Items\"\n },\n {\n \"headers\": {\n \"return-path\": [\n \"june_user@example.com\"\n\t\t\t\t], \n \"date\": [\n \"Mon, 21 Nov 2011 21:14:21 +0000 (GMT)\"\n ],\n \"x-mailer\": [\n \"Webmail\"\n ],\n \"INTERNALDATE\": [\n 1321910752\n ],\n \"content-type\": [\n\t\t\t\t\t\"multipart/mixed; boundary=\\\"---- \n=_Part_3_280999237.1321910061210\\\"\"\n\t\t\t\t], \"to\": [\n \"joe_user@example.com\"\n ],\n \"x-originating-ip\": [\n \"[10.0.63.198]\"\n\t\t\t\t], \"from\": [\n \"June User <june_user@example.com>\"\n \"mime-version\": [\n\t\t\t\t\t\"1.0\" ],\n \"received\": [\n\t\t\t\t\t\"from smtprelay.dev.hostedemail.com (mail.dev.hostedemail.com [216.40.41.197]) by imf25.hostedemail.com (Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:24 +0000 (UTC)\",\n \"from filter.hostedemail.com (ff-bigip5 [10.5.49.254]) by smtprelay01.dev.hostedemail.com (Postfix) with SMTP id B447A19063B for <joe_user@example.com>; Mon, 21 Nov 2011 21:14:22 +0000 (UTC)\",\n\t\t\t\t\"from webmail01 (imap-ext [216.40.41.197])\",\n\t\t\t\t\"from 10.0.63.198 ([10.0.63.198]) by webmail01 (Webmail) with \nHTTP; Mon, 21 Nov 2011 21:14:21 +0000 (GMT)\"\n ],\n \"x-spam-summary\": [\n \"20,1.5,0,641aaf435ac40a11,d41d8cd98f00b204,june_user@example .com,joe_user@example.com,RULES_HIT:152:355:379:541:582:871:929:960:988 :989:1000:1152:1260:1261:1313:1314:1345:1373:1431:1437:1467:1516:1517:1 527:1536:1569:1575:1594:1676:1699:1711:1714:1730:1747:1764:1766:1792:21 94:2197:2199:2200:2375:2376:2393:2559:2562:2827:3138:3653:3867:3869:387 1:3873:4512:4513:4515:6119:6261:6353:6506:7281:7774:7874:7974:8957:9040 :9709:9913:10004:10400:10562:11604:11658:11914:11919:12043,0,RBL:216.40 .41.197:@example.com:.lbl8.mailshell.net-64.201.201.201 62.10.55.100,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCach e:0,MSF:not bulk,SPF:ft,MSBL:none,DNSBL:none,Custom_rules:0:0:0\"\n ],\n \"delivered-to\": [\n \"joe_user@example.com\"\n ],\n \"x-fda\": [\n \"65578184490.04\"\n ],\n \"subject\": [\n \"Check out this cute pic!\"\n ],\n \"\\t(authenticated sender\": [\n\t\t\t\t\t\"june_user@example.com) by omf01.dev.hostedemail.com \n(Postfix) with ESMTP for <joe_user@example.com>; Mon, 21 Nov 2011 \n21:14:22 +0000 (UTC)\"\n ],\n \"x-filterd-recvd-size\": [\n\t\t\t\t\t\"141147\",\n\t\t\t\t\t\"140632\" \n ],\n\t\t\t\t\"x-session-marker\": [ \"6A756E655F757365724064656D6F636F2E636F6D\"\n ],\n \"x-panda\": [\n \t\"scanned!\",\n \"scanned!\"\n ],\n\t\t\t\t\"message-id\": [ \n \t\"<1001196937.4.1321910062338.JavaMail.mail@webmail01>\"\n\t\t\t\t] \n\t\t\t},\n \"folder-unicode\": \"plus ça change\",\n \"id\": \"U2FsdGVkX1+FRyKE8mqxWO7BCySwid3bBxSx8Yy0ro+Ss/1n5PIdD/jylUTBhjAbxzItec P5yCwChiZKxZyQ1n9bcicRxAWh7Cr6FYCV80y1w9BjpJoJxPdo9sa/jbUvQnGdbKGzaTqgR VqcFFfhcgM7/WBFFfc6gEBe+apdt602KqtHBBnACis3FWL0LJq6hXGDhTF2wg2QWJzrbG2q BW6nAkfduj2z\",\n \"folder\": \"plus &AOc-a change\"\n }\n ], \n}\n ", "language": "perl", "name": " " } ] } [/block] ## Example 2 Retrieves messages with specific headers. **Request** [block:code] { "codes": [ { "code": "{\n \"credentials\": {\n \"user\": \"domain_admin@example.com\",\n \"password\": \"pencil75\"\n },\n \"user\": \"joe_user@example.com\",\n \"headers\": [\n \"subject\",\n \"from\" \n ]\n}", "language": "perl", "name": " " } ] } [/block] **Response** [block:code] { "codes": [ { "code": "{\n \"success\": true,\n \"count\": 3\n \"messages\": [\n {\n \"headers\": {\n \"INTERNALDATE\": [\n 1321910752\n ],\n \"from\": [\n \"June User <june_user@example.com>\"\n ],\n \"subject\": [\n \"IMPORTANT!! Please read!!!\"\n ]\n\t\t\t},\n \"folder-unicode\": \"INBOX\",\n \"id\": \"U2FsdGVkX1+OFA3m95RbsYdxH4EFoUGa2DUr8Zg+G+8hvH53T/RzR6hEBwIGfrSkfNadTQ TR2nb/OsRk9oBp01+/oUYKciim5sU1SI/k2uMed2tgyZtH7W4SY3UBMa17I+FQYGx/owSvx gjrYZHZQkiExpah6x5YaKqkkpH5CmXLKHvWGHjZNF28agK0KP0V\",\n \"folder\": \"INBOX\"\n },\n {\n \"headers\": {\n \"INTERNALDATE\": [\n 1321910752\n\t\t\t], \n \"from\": [\n \"June User <june_user@example.com>\"\n ],\n \"subject\": [\n \"Have you signed up for the Spring Party yet?\"\n\t\t\t] \n },\n \"folder-unicode\": \"INBOX\",\n\t\t\"id\":\n\"U2FsdGVkX1+T0SHk/WSnTKkpVxHwTwtmJlz2mAf+bk8itlX7tHnbIJfi40EO5siFsOj98f Sz/qXdr/dQzvOrYs4fQpl0Juo76TQrKDfb1EGuYO79Rw2smAWA57DHKzizgbvEOdiBkSE9z f/HnZnh8hgTV4vQ8eYJ6JYza9PGbQ2c/Ox0TiY6Yb8yN/HmKURj\",\n\t\t \"folder\": \"INBOX\"\n }, \n {\n\t\t\t\"headers\": {\n \t\t\t\"INTERNALDATE\": [\n \t\t\t1321910752\n \t\t\t],\n \t\t\t\"from\": [\n \t\t\t\"Manager <mrmanager@example.com>\"\n \t\t\t],\n \t\t\t\"subject\": [\n\t\t\t\t\t\"Please file your end of quarter reports by end of quarter\" \n ]\n\t\t\t},\n \"folder-unicode\": \"INBOX\",\n \"id\": \"U2FsdGVkX1+TadnPrnXWEz0gB2x1rcV6ZrlND3+U4gnpAkXGh6LiT0E9L6GLDgNq85Vf/r XJ6Ka1l1DsfPT4qChnyV+9uqbJSRWzZC26h2Ajg+RK+lObcn6f23Cfyj+8sqQz07ikmfI4t vVl5RImJjC7QPthdtYmxcbRhH+fjVPcOz/RbknRhcz/KeDJsYiD\",\n \"folder\": \"INBOX\"\n }\n\t], \n}\n ", "language": "perl", "name": " " } ] } [/block]