From b99b5b8d3800cab2d2580401a3f131db342e0c83 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 19 Mar 2001 23:08:19 +0000 Subject: Removed gnome.h and ctype.h (send_queue_send): Don't remove the 2001-03-19 Jeffrey Stedfast * mail-ops.c: Removed gnome.h and ctype.h (send_queue_send): Don't remove the X-Evolution header here. (mail_send_message): Remove it here instead (so we only have to remove it in one place - no matter if you send a single message or send_queue. svn path=/trunk/; revision=8832 --- mail/ChangeLog | 8 ++++++++ mail/mail-ops.c | 37 ++++++++++++++++++------------------- 2 files changed, 26 insertions(+), 19 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index e20a163713..9c75b357ae 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,11 @@ +2001-03-19 Jeffrey Stedfast + + * mail-ops.c: Removed gnome.h and ctype.h + (send_queue_send): Don't remove the X-Evolution header here. + (mail_send_message): Remove it here instead (so we only have to + remove it in one place - no matter if you send a single message or + send_queue. + 2001-03-19 Jeffrey Stedfast * mail-format.c (write_headers): Write the date header. diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 11ec9d3ab9..17314ceee8 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -26,8 +26,7 @@ */ #include -#include -#include + #include #include #include @@ -462,35 +461,38 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte CamelMessageInfo *info; CamelTransport *xport; const char *version; - + if (SUB_VERSION[0] == '\0') version = "Evolution/" VERSION " (Preview Release)"; else version = "Evolution/" VERSION SUB_VERSION " (Preview Release)"; - camel_medium_add_header(CAMEL_MEDIUM (message), "X-Mailer", version); - camel_mime_message_set_date(message, CAMEL_MESSAGE_DATE_CURRENT, 0); - - xport = camel_session_get_transport(session, destination, ex); - if (camel_exception_is_set(ex)) + camel_medium_add_header (CAMEL_MEDIUM (message), "X-Mailer", version); + camel_mime_message_set_date (message, CAMEL_MESSAGE_DATE_CURRENT, 0); + + /* Remove the X-Evolution header so we don't send our flags too ;-) */ + camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution"); + + xport = camel_session_get_transport (session, destination, ex); + if (camel_exception_is_set (ex)) return; - camel_transport_send(xport, (CamelMedium *)message, ex); - camel_object_unref((CamelObject *)xport); - if (camel_exception_is_set(ex)) + camel_transport_send (xport, (CamelMedium *)message, ex); + camel_object_unref (CAMEL_OBJECT (xport)); + if (camel_exception_is_set (ex)) return; /* post-process */ - info = camel_message_info_new(); + info = camel_message_info_new (); info->flags = CAMEL_MESSAGE_SEEN; - + if (driver) camel_filter_driver_filter_message (driver, message, info, NULL, NULL, "", ex); if (sent_folder) - camel_folder_append_message(sent_folder, message, info, ex); + camel_folder_append_message (sent_folder, message, info, ex); - camel_message_info_free(info); + camel_message_info_free (info); } /* ********************************************************************** */ @@ -616,7 +618,7 @@ send_queue_send(struct _mail_msg *mm) GPtrArray *uids; int i; - printf("sending queue\n"); + d(printf("sending queue\n")); uids = camel_folder_get_uids (m->queue); if (uids == NULL || uids->len == 0) @@ -641,9 +643,6 @@ send_queue_send(struct _mail_msg *mm) if (camel_exception_is_set (&mm->ex)) break; - /* Remove the X-Evolution header so we don't send our flags too ;-) */ - camel_medium_remove_header (CAMEL_MEDIUM (message), "X-Evolution"); - /* Get the preferred transport URI */ destination = (char *)camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Transport"); if (destination) { -- cgit v1.2.3