On Thu, Sep 15, 2016 at 3:24 PM, Sam Ruby <[email protected]> wrote:
> As luck would have it, rewriting how emails are constructed was going
> to be next on my list.  If you look at icla.json.rb, the svn tasks are
> fairly clean and the mail tasks are a bit brute force, and contain a
> lot of common code.  This code would be required for each of the
> actions, so I plan to factor it out into a common method.
>
> I'll look at it later this afternoon.  Part of that commit will be
> support for the various reject actions (incomplete, unsigned, etc),
> which will become trivial (jump immediately to the tasklist with no
> form, the task consists of a single email which you can browse before
> proceeding).

Done for now.  Here's the commit:

https://github.com/apache/whimsy/commit/6aefcd7ce2121a389588dd7279cfab302ed48b2c

For what it is worth, the documentation on the FromField can be found here:

http://www.rubydoc.info/github/mikel/mail/Mail

I'll state that I find the API that gem provides to be a little...
quirky.  Apparently email can have multiple from fields (who knew?)
and some of the methods provide the full email string (including name
and optional comment) and others provide only the email address
itself.  Add to that the fact that the secmail tool will allow you to
edit the cc and bcc fields, and merging addresses from the original
email and the input from the form and there being multiple fields
(from, to, cc, bcc) and you have a bit of a mess.

In any case, this mess is encapsulated now, so once debugged it
hopefully will work consistently for all replies.

- Sam Ruby

Reply via email to