* src/modest-tny-account-store.c
authorAlberto Garcia <agarcia@igalia.com>
Fri, 17 Aug 2007 17:09:05 +0000 (17:09 +0000)
committerAlberto Garcia <agarcia@igalia.com>
Fri, 17 Aug 2007 17:09:05 +0000 (17:09 +0000)
    (get_smtp_specific_transport_account_for_open_connection):
    Don't try to use a connection-specific SMTP server if the option
    is disabled for that account

pmo-trunk-r3014

src/modest-tny-account-store.c

index 9faf6a2..e46ca55 100644 (file)
@@ -1413,6 +1413,12 @@ get_smtp_specific_transport_account_for_open_connection (ModestTnyAccountStore *
        
        /*  Get the connection-specific transport acccount, if any: */
        ModestAccountMgr *account_manager = modest_runtime_get_account_mgr ();
        
        /*  Get the connection-specific transport acccount, if any: */
        ModestAccountMgr *account_manager = modest_runtime_get_account_mgr ();
+
+        /* Check if this account has connection-specific SMTP enabled */
+        if (!modest_account_mgr_get_use_connection_specific_smtp (account_manager, account_name)) {
+                return NULL;
+        }
+
        gchar* server_account_name = modest_account_mgr_get_connection_specific_smtp (account_manager, 
                account_name, connection_name);
 
        gchar* server_account_name = modest_account_mgr_get_connection_specific_smtp (account_manager, 
                account_name, connection_name);