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



commit 361ce70befd5d9f7d5c24373854b03c40c31dcaa
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 7480940b8e..efe821d411 100644
--- a/src/mail/em-composer-utils.c
+++ b/src/mail/em-composer-utils.c
@@ -3310,6 +3310,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]