[evolution] I#1696 - Composer: Consider only accounts, which can send messages
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] I#1696 - Composer: Consider only accounts, which can send messages
- Date: Mon, 15 Nov 2021 14:49:42 +0000 (UTC)
commit 2788bed7bf1363634d1689c4d3cbc0e805dfb0ee
Author: Milan Crha <mcrha redhat com>
Date: Mon Nov 15 15:48:38 2021 +0100
I#1696 - Composer: Consider only accounts, which can send messages
That's when trying to match an account based on the recipients
in the original message.
Closes https://gitlab.gnome.org/GNOME/evolution/-/issues/1696
src/libemail-engine/e-mail-utils.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
---
diff --git a/src/libemail-engine/e-mail-utils.c b/src/libemail-engine/e-mail-utils.c
index 70325bb9bd..f35b672e3a 100644
--- a/src/libemail-engine/e-mail-utils.c
+++ b/src/libemail-engine/e-mail-utils.c
@@ -563,6 +563,35 @@ mail_account_in_recipients (ESourceRegistry *registry,
}
}
+ /* Return only accounts, which can send messages */
+ if (match) {
+ ESourceMailSubmission *submission;
+
+ submission = e_source_has_extension (source, E_SOURCE_EXTENSION_MAIL_SUBMISSION) ?
+ e_source_get_extension (source, E_SOURCE_EXTENSION_MAIL_SUBMISSION) : NULL;
+
+ match = submission && e_source_mail_submission_get_transport_uid (submission) != NULL;
+
+ if (match) {
+ ESource *transport_source;
+
+ transport_source = e_source_registry_ref_source (registry,
e_source_mail_submission_get_transport_uid (submission));
+ if (transport_source) {
+ ESourceBackend *transport;
+
+ transport = e_source_has_extension (transport_source,
E_SOURCE_EXTENSION_MAIL_TRANSPORT) ?
+ e_source_get_extension (transport_source,
E_SOURCE_EXTENSION_MAIL_TRANSPORT) : NULL;
+
+ match = transport && e_source_backend_get_backend_name (transport) != NULL &&
+ g_strcmp0 (e_source_backend_get_backend_name (transport), "none") !=
0;
+
+ g_object_unref (transport_source);
+ } else {
+ match = FALSE;
+ }
+ }
+ }
+
g_object_unref (source);
return match;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]