[evolution-mapi] Bug #657309 - Cann't send mail



commit be629edc1bb542bf16f9ce6252d53bfb10f8ea87
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 25 11:08:01 2011 +0200

    Bug #657309 - Cann't send mail

 src/camel/camel-mapi-transport.c               |    3 ++-
 src/libexchangemapi/exchange-mapi-connection.c |    6 +++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/camel/camel-mapi-transport.c b/src/camel/camel-mapi-transport.c
index e3da886..ba31a6d 100644
--- a/src/camel/camel-mapi-transport.c
+++ b/src/camel/camel-mapi-transport.c
@@ -121,7 +121,7 @@ mapi_send_to_sync (CamelTransport *transport,
 	item = mapi_mime_message_to_mail_item (message, 0, from, cancellable, NULL);
 
 	/* send */
-	st = mapi_message_item_send (conn, item, error);
+	st = mapi_message_item_send (conn, item, &mapi_error);
 
 	g_object_unref (conn);
 
@@ -167,6 +167,7 @@ camel_mapi_transport_class_init (CamelMapiTransportClass *class)
 
 	service_class = CAMEL_SERVICE_CLASS (class);
 	service_class->get_name = mapi_transport_get_name;
+	service_class->settings_type = CAMEL_TYPE_MAPI_SETTINGS;
 
 	transport_class = CAMEL_TRANSPORT_CLASS (class);
 	transport_class->send_to_sync = mapi_send_to_sync;
diff --git a/src/libexchangemapi/exchange-mapi-connection.c b/src/libexchangemapi/exchange-mapi-connection.c
index 39114c9..1071b8d 100644
--- a/src/libexchangemapi/exchange-mapi-connection.c
+++ b/src/libexchangemapi/exchange-mapi-connection.c
@@ -856,6 +856,10 @@ exchange_mapi_util_modify_recipients (ExchangeMapiConnection *conn, TALLOC_CTX *
 			/* We should never get an ambiguous resolution as we use the email-id for resolving.
 			 * However, if we do still get an ambiguous entry, we can't handle it :-( */
 			exchange_mapi_debug_print ("%s: %s() - '%s' is ambiguous ", G_STRLOC, G_STRFUNC, recipient->email_id);
+			ms = MAPI_E_AMBIGUOUS_RECIP;
+			/* Translators: %s is replaced with an email address which was found ambiguous on a remote server */
+			g_set_error (perror, E_MAPI_ERROR, ms, _("Recipient '%s' is ambiguous"), recipient->email_id);
+			goto cleanup;
 		} else if (FlagList->aulPropTag[i] == MAPI_UNRESOLVED) {
 			/* If the recipient is unresolved, consider it is a SMTP one */
 			SRowSet->aRow = talloc_realloc(mem_ctx, SRowSet->aRow, struct SRow, SRowSet->cRows + 1);
@@ -890,7 +894,7 @@ cleanup:
 
 	exchange_mapi_debug_print("%s: Leaving %s ", G_STRLOC, G_STRFUNC);
 
-	return TRUE;
+	return ms == MAPI_E_SUCCESS;
 }
 
 static gboolean



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]