On 16 September 2016 at 01:24, Craig Russell <[email protected]> wrote: > Hi Sam, > >> On Sep 15, 2016, at 5:01 PM, Sam Ruby <[email protected]> wrote: >> >> 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 > > W O W lots of code in there. I’m just a bit surprised there is not more > common code in unsigned.json.rb, pubkey.json.rb, incomplete.json.rb. I > thought there would be more in message.rb that could be reused more easily. > I’m a big fan of DRY. ;-) > >> >> 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?) > > Not I. Never saw any mail from more than one address.
[FTR] https://tools.ietf.org/html/rfc4021#section-2.1.2 says: Specifies the author(s) of the message; that is, the mailbox(es) of the person(s) or system(s) responsible for the writing of the message. The Sender is defined as: Specifies the mailbox of the agent responsible for the actual transmission of the message. >> 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. > > Certainly not easy to just add a bit of logic. I tried that. :( >> >> In any case, this mess is encapsulated now, so once debugged it >> hopefully will work consistently for all replies. > > Looks good so far. > > Do you have a schedule for the rest of the doc types so we can get rid of > duplicate handling of the incoming mails? > > Thanks! > > Craig >> >> - Sam Ruby > > Craig L Russell > Architect > [email protected] > P.S. A good JDO? O, Gasp! > > > > >
