[balsa/gmime3: 36/51] g_mime_message_set_{reply_to,sender}



commit f3fe622a213374549bcb6ced920855d60b8b62e2
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Fri Nov 22 15:25:40 2019 -0800

    g_mime_message_set_{reply_to,sender}
    
    have been removed. Instead, we access the internet-address-lists
    directly.
    
    modified:   libbalsa/send.c

 libbalsa/send.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/libbalsa/send.c b/libbalsa/send.c
index 0de31f725..29b7e9241 100644
--- a/libbalsa/send.c
+++ b/libbalsa/send.c
@@ -1484,19 +1484,15 @@ libbalsa_message_create_mime_message(LibBalsaMessage *message,
     message_add_references(message, mime_message);
 
     headers = libbalsa_message_get_headers(message);
+
     if (headers->from != NULL) {
-        tmp = internet_address_list_to_string(headers->from, NULL, TRUE);
-        if (tmp != NULL) {
-            g_mime_message_set_sender(mime_message, tmp);
-            g_free(tmp);
-        }
+        ia_list = g_mime_message_get_from(mime_message);
+        internet_address_list_append(ia_list, headers->from);
     }
+
     if (headers->reply_to != NULL) {
-        tmp = internet_address_list_to_string(headers->reply_to, NULL, TRUE);
-        if (tmp != NULL) {
-            g_mime_message_set_reply_to(mime_message, tmp);
-            g_free(tmp);
-        }
+        ia_list = g_mime_message_get_reply_to(mime_message);
+        internet_address_list_append(ia_list, headers->from);
     }
 
     if (LIBBALSA_MESSAGE_GET_SUBJECT(message)) {


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