From 05601e86ebfc36093c8b2afb66cbe14cb45d6bd2 Mon Sep 17 00:00:00 2001 From: Parthasarathi Susarla Date: Sat, 22 Oct 2005 08:18:50 +0000 Subject: Return valid transport, only if the account is enabled. 2005-10-22 Parthasarathi Susarla * mail-config.c: (mail_config_get_default_account): Return valid transport, only if the account is enabled. 2005-10-22 Parthasarathi Susarla * em-composer-utils.c: (create_new_composer): If the account corresponding to the fromuri is not enabled. Then load the preferred account from the composer. ---------------------------------------------------------------------- svn path=/trunk/; revision=30555 --- mail/em-composer-utils.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mail/em-composer-utils.c') diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index c4f472cf8f..66f4ca90a0 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -588,6 +588,13 @@ create_new_composer (const char *subject, const char *fromuri) if (fromuri) account = mail_config_get_account_by_source_url(fromuri); + /* If the account corresponding to the fromuri is not enabled. + * We get the preffered account from the composer and use that + * as the account to send the mail. + */ + if (!account) + account = e_msg_composer_get_preferred_account (composer); + e_msg_composer_set_headers (composer, account?account->name:NULL, NULL, NULL, NULL, subject); em_composer_utils_setup_default_callbacks (composer); -- cgit v1.2.3