Zimbra REST API Reference:Import Message: Difference between revisions
(New page: << Back to Zimbra REST API Reference == REST API Method: Import Message == Imports a message to a mail folder in MIME RFC822 format. Default (inbox/...) |
|||
Line 31: | Line 31: | ||
The following examples show using the [http://en.wikipedia.org/wiki/CURL curl] utility to post a file to the REST command. Be sure to replace {username} and {password} with the account username and password. | The following examples show using the [http://en.wikipedia.org/wiki/CURL curl] utility to post a file to the REST command. Be sure to replace {username} and {password} with the account username and password. | ||
Import | Import the message into the "inbox" folder: | ||
<pre> | <pre> | ||
curl -{username}:{password} --upload-file /tmp/ | curl -{username}:{password} --upload-file /tmp/mymessage.msg http://localhost:7070/home/john.doe/inbox | ||
</pre> | </pre> | ||
Import | Import the message into the user-defined "mymessages" folder: | ||
<pre> | <pre> | ||
curl -{username}:{password} --upload-file /tmp/ | curl -{username}:{password} --upload-file /tmp/mymessage.msg http://localhost:7070/home/john.doe/mymessages | ||
</pre> | </pre> | ||
Revision as of 16:17, 19 January 2010
<< Back to Zimbra REST API Reference
REST API Method: Import Message
Imports a message to a mail folder in MIME RFC822 format. Default (inbox/sent/trash/junk) and user-defined folders are supported.
URL
http://localhost:7070/home/john.doe/{folder-name}
HTTP Method
POST
Formats
N/A
Requires Authentication
true
(Go to Authentication)
Parameters
N/A
Usage Examples
The following examples show using the curl utility to post a file to the REST command. Be sure to replace {username} and {password} with the account username and password.
Import the message into the "inbox" folder:
curl -{username}:{password} --upload-file /tmp/mymessage.msg http://localhost:7070/home/john.doe/inbox
Import the message into the user-defined "mymessages" folder:
curl -{username}:{password} --upload-file /tmp/mymessage.msg http://localhost:7070/home/john.doe/mymessages