aboutsummaryrefslogtreecommitdiff
path: root/lib/imap.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-03-03 16:44:53 +0000
committerSteve Holme <steve_holme@hotmail.com>2013-03-03 16:44:53 +0000
commit298f806d01fa49d6b62fd3de591a2cb33f7d725b (patch)
tree93d14e7e8e10666822ca01f98f9f3c22ae20549f /lib/imap.c
parente6b7dae9471d5b2ddcdba9f5012aee82a50bf47f (diff)
imap: Added comments to imap_append()
Diffstat (limited to 'lib/imap.c')
-rw-r--r--lib/imap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/imap.c b/lib/imap.c
index cf27d6084..503ed6d46 100644
--- a/lib/imap.c
+++ b/lib/imap.c
@@ -730,16 +730,18 @@ static CURLcode imap_append(struct connectdata *conn)
struct IMAP *imap = conn->data->state.proto.imap;
char *mailbox;
+ /* Check we know the size of the upload */
if(conn->data->set.infilesize < 0) {
failf(conn->data, "Cannot APPEND with unknown input file size\n");
return CURLE_UPLOAD_FAILED;
}
+ /* Make sure the mailbox is in the correct atom format */
mailbox = imap_atom(imap->mailbox);
-
if(!mailbox)
return CURLE_OUT_OF_MEMORY;
+ /* Send the APPEND command */
result = imap_sendf(conn, "APPEND %s (\\Seen) {%" FORMAT_OFF_T "}",
mailbox, conn->data->set.infilesize);