aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/providers/imap/camel-imap-folder.c18
2 files changed, 14 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 227dbbe5dc..7ece9b58fd 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2000-07-06 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * providers/imap/camel-imap-folder.c (imap_append_message): Changed
+ over to camel_imap_command_extended as that was the source of the
+ problems - apparently appending replies with more than just 1 line.
+
2000-07-05 Dan Winship <danw@helixcode.com>
* camel-folder-search.c (search_header_contains): make header
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 6b1a796738..0b997225b9 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -456,7 +456,7 @@ imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
g_return_if_fail (message != NULL);
/* write the message to a CamelStreamMem so we can get it's size */
- mem = CAMEL_STREAM_MEM (camel_stream_mem_new());
+ mem = CAMEL_STREAM_MEM (camel_stream_mem_new ());
if (camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (message), CAMEL_STREAM (mem)) == -1) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);
camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
@@ -467,20 +467,18 @@ imap_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelExcept
return;
}
- mem->buffer = g_byte_array_append (mem->buffer, g_strdup("\r\n"), 3);
+ mem->buffer = g_byte_array_append (mem->buffer, g_strdup ("\r\n"), 3);
- if (url && url->path && *(url->path + 1) && strcmp(folder->full_name, "INBOX"))
- folder_path = g_strdup_printf ("%s/%s", url->path, folder->full_name);
+ if (url && url->path && *(url->path + 1) && strcmp (folder->full_name, "INBOX"))
+ folder_path = g_strdup_printf ("%s/%s", url->path + 1, folder->full_name);
else
folder_path = g_strdup (folder->full_name);
/* FIXME: len isn't really correct I don't think, we need to filter and possibly other things */
- status = camel_imap_command (CAMEL_IMAP_STORE (folder->parent_store),
- folder, &result,
- "APPEND %s (\\Seen) {%d}\r\n%s",
- folder_path,
- mem->buffer->len,
- mem->buffer->data);
+ status = camel_imap_command_extended (CAMEL_IMAP_STORE (folder->parent_store),
+ folder, &result,
+ "APPEND %s (\\Seen) {%d}\r\n%s",
+ folder_path, mem->buffer->len - 1, mem->buffer->data);
if (status != CAMEL_IMAP_OK) {
CamelService *service = CAMEL_SERVICE (folder->parent_store);