Re: [gmime-devel] copy gmimemessage



The problem is that adding a new clone() virtual method to GMimeObject (and likely to GMimeDataWrapper as well) would break ABI.

 

Is there a reason you can’t simply re-use the same GMimeMessage structure and simply replace the To addresses and the main message text after sending the message to the previous recipient? That would be even more efficient than cloning.

 

Jeff

 

 

From: Kane Kim <kane isturm gmail com>
Date: Friday, August 4, 2017 at 3:05 PM
To: Daniel Kahn Gillmor <dkg fifthhorseman net>
Cc: Jeffrey Stedfast <jestedfa microsoft com>, "gmime-devel-list gnome org" <gmime-devel-list gnome org>
Subject: Re: [gmime-devel] copy gmimemessage

 

Yeah, this is actually one of our major use cases, we have to create different copies of a message efficiently (for different recipients). Re-composing message after parsing seems to be non-trivial (keeping exactly the same structure), re-parsing message again - inefficient.

 

On Fri, Aug 4, 2017 at 9:08 AM, Daniel Kahn Gillmor <dkg fifthhorseman net> wrote:

On Thu 2017-08-03 18:24:12 +0000, Jeffrey Stedfast via gmime-devel-list wrote:
> Probably constructing the message manually.

Should we add a clone function to the API for future versions?  it
sounds like that might be something commonly needed.

Kane, if you implement it outside of gmime, please consider proposing a
patch!  if you use github:

    https://github.com/jstedfast/gmime

    --dkg

 



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