[balsa/gmime3: 38/54] g_mime_message_set_{reply_to,sender}



commit 0db48d0c8b8dff681ed31dbaa5d5230a64b5b99d
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 39518e37c..0ab0fb231 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]