From bc38f72b7ccc72d8e481a65763f501241ccf8c1e Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 14 Sep 2001 19:53:12 +0000 Subject: Append a message to any exception we get appending to any folders after 2001-09-14 Jeffrey Stedfast * mail-ops.c (mail_send_message): Append a message to any exception we get appending to any folders after having sent the message successfully saying that the message was sent successfully so the user doesn't misinterpret the error. svn path=/trunk/; revision=12830 --- mail/mail-ops.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mail/mail-ops.c') diff --git a/mail/mail-ops.c b/mail/mail-ops.c index a8b05560fd..9a3976c6e8 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -542,6 +542,15 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte NULL, NULL, NULL, "", ex); if (camel_exception_is_set (ex)) { + char *description; + ExceptionId id; + + id = camel_exception_get_id (ex); + description = g_strdup (camel_exception_get_description (ex)); + camel_exception_setv (ex, id, "%s\n%s", description, + _("However, the message was successfully sent.")); + g_free (description); + camel_message_info_free (info); return; } @@ -562,6 +571,17 @@ mail_send_message(CamelMimeMessage *message, const char *destination, CamelFilte if (folder) { camel_folder_append_message (folder, message, info, ex); + if (camel_exception_is_set (ex)) { + char *description; + ExceptionId id; + + id = camel_exception_get_id (ex); + description = g_strdup (camel_exception_get_description (ex)); + camel_exception_setv (ex, id, "%s\n%s", description, + _("However, the message was successfully sent.")); + g_free (description); + } + camel_folder_sync (folder, FALSE, NULL); camel_object_unref (CAMEL_OBJECT (folder)); } -- cgit v1.2.3