[evolution] I#432 - Prefer Reply-To from To/Cc in Group Reply



commit 7958cefa58e5b2cd97d591e9f72109f6f93866fe
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 9 14:03:30 2019 +0200

    I#432 - Prefer Reply-To from To/Cc in Group Reply
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/432

 src/mail/em-composer-utils.c | 8 ++++++++
 1 file changed, 8 insertions(+)
---
diff --git a/src/mail/em-composer-utils.c b/src/mail/em-composer-utils.c
index 4aa154d9cf..9dfc36027e 100644
--- a/src/mail/em-composer-utils.c
+++ b/src/mail/em-composer-utils.c
@@ -3312,6 +3312,14 @@ em_utils_get_reply_all (ESourceRegistry *registry,
        concat_unique_addrs (to, to_addrs, rcpt_hash);
        concat_unique_addrs (cc, cc_addrs, rcpt_hash);
 
+       /* Set as the 'To' the first 'Reply-To' address, if such exists, when no address
+          had been picked (like when all addresses are configured mail accounts). */
+       if (reply_to &&
+           camel_address_length ((CamelAddress *) to) == 0 &&
+           camel_internet_address_get (reply_to, 0, &name, &addr)) {
+               camel_internet_address_add (to, name, addr);
+       }
+
        /* Promote the first Cc: address to To: if To: is empty. */
        if (camel_address_length ((CamelAddress *) to) == 0 &&
            camel_address_length ((CamelAddress *) cc) > 0) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]