aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config.c
diff options
context:
space:
mode:
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r--mail/mail-config.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 48e735814f..e88c9a5a1f 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1326,6 +1326,29 @@ mail_config_get_account_by_source_url (const char *source_url)
return NULL;
}
+const MailConfigAccount *
+mail_config_get_account_by_transport_url (const char *transport_url)
+{
+ const MailConfigAccount *account;
+ GSList *l;
+
+ g_return_val_if_fail (transport_url != NULL, NULL);
+
+ l = config->accounts;
+ while (l) {
+ account = l->data;
+ if (account
+ && account->transport
+ && account->transport->url
+ && e_url_equal (account->transport->url, transport_url))
+ return account;
+
+ l = l->next;
+ }
+
+ return NULL;
+}
+
const GSList *
mail_config_get_accounts (void)
{