Re: [gmime-devel] recommended way to set addresses (To, BCC)



Why? g_mime_header_list functions are the low-level functions that are used by the higher level APIs. There's no reason to forbid direct access to the header values, it's just simpler for most people (including myself) to use the higher level APIs such as the g_mime_message and internet_address_list APIs.

Hope that helps,

Jeff

On 8/20/2018 9:42 PM, Kane Kim wrote:
Shouldn't g_mime_header_list_set return error if it tries to set address or transparently fallback to g_mime_message_get_* internally?

On Mon, Aug 20, 2018 at 2:56 PM Kane Kim <kane isturm gmail com> wrote:
Thanks, will try that.

On Mon, Aug 20, 2018 at 2:31 PM Jeffrey Stedfast <fejj gnome org> wrote:
Hi Kane,

I just realized that it doesn't look like I responded to this (got distracted when I saw your message a while back, I guess).

It is recommended that you use functions like g_mime_message_get_to/cc/bcc() to get the InternetAddressList, and then use internet_address_list_add/insert/remove() to manipulate the list of addresses for those headers.

Hope that helps,

Jeff

On 8/8/2018 5:36 PM, Kane Kim via gmime-devel-list wrote:
Hello,

Currently I'm trying to set To/Bcc headers with `g_mime_header_list_set`.
Calling it with header "To" and emailĀ "asdfasdf gmail com" breaks resulting mime.

Is it a bug or different function should be used to insert addresses?

Thanks!



_______________________________________________
gmime-devel-list mailing list
gmime-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gmime-devel-list





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