aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-composer-utils.c
diff options
context:
space:
mode:
authorParthasarathi Susarla <sparthasarathi@novell.com>2005-10-22 16:18:50 +0800
committerParthasarathi Susarla <saps@src.gnome.org>2005-10-22 16:18:50 +0800
commit05601e86ebfc36093c8b2afb66cbe14cb45d6bd2 (patch)
tree75999f72fb1056b2501c12bab13b46556f0bdf30 /mail/em-composer-utils.c
parenta0ce7e9771be25292bf985a96db5603b34a68d9e (diff)
downloadgsoc2013-evolution-05601e86ebfc36093c8b2afb66cbe14cb45d6bd2.tar.gz
gsoc2013-evolution-05601e86ebfc36093c8b2afb66cbe14cb45d6bd2.tar.zst
gsoc2013-evolution-05601e86ebfc36093c8b2afb66cbe14cb45d6bd2.zip
Return valid transport, only if the account is enabled.
2005-10-22 Parthasarathi Susarla <sparthasarathi@novell.com> * mail-config.c: (mail_config_get_default_account): Return valid transport, only if the account is enabled. 2005-10-22 Parthasarathi Susarla <sparthasarathi@novell.com> * 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
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r--mail/em-composer-utils.c7
1 files changed, 7 insertions, 0 deletions
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);