Commons Email
  1. Commons Email
  2. EMAIL-34

[email] Allow access to MimeMessage from Email class

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      Hi Dion,

      a few months ago I had a chat with Eric Pugh to improve the
      commons-email library and I sent Eric the diffs but they got never
      applied. And I used the updated version already for for a Fulcrum
      Commons EMail Service
      (http://jakarta.apache.org/turbine/fulcrum/fulcrum-commonsemail/index.html)
      and in production for my company.

      So the questions remains if this would be a contribution suitable for
      commons-email ....

      > Hi Eric,
      >
      > long story - since I'm in the middle of migrating my old Turbine
      > application to CVS HEAD I stumbled across commons-email and I'm
      > currently migrating a very old Turbine service for sending emails to
      > use commons-email to a Fulcrum service and having a few problems, and
      > .....
      >
      > Since the mailing list does not respond to my subscription and you are
      > the main committer .... I need to patch the existing code to fulfill
      > some basic requirements
      >
      > 1) having a few getters for basic properties of EMail would be nice
      > (subject, fromAddress) to enable some diagnostic ouptut if anything
      > goes wrong while creating the MimeMessage. Having said that a
      > toString() implementation would not be bad either.
      >
      > 2) more significant I need to seperate the creation of the underlying
      > MimeMessage from actually sending it, e.g. I do a lot of stuff with
      > SMIME signature where you build the MimeMessage and then sign it.
      > Building the MimeMessage (the hard part) is already done by
      > commons-email but it would be useful to intercept the actual sending
      > to provide more flexibility. I think of
      >
      > public final MimeMessage getMimeMessage();
      > public void buildMimeMessage() throws EmailException;
      > public void sendMimeMessage() throws EmailException;
      >
      > public void send() throws EmailException
      >

      { > this.buildMimeMessage(); > // now it is possible to call getMimeMessage() > this.sendMimeMessage(); > }

      >
      > 3) access to the MimeMessage allows to retrieve the message id - the
      > only way to keep track of message sent by the SMPT server
      >
      > I hope my comments make sense - could you forward the message to the
      > mailing list ... as always I have little time to wait for the outcome
      > of lenghty discussion so I start doing the work tommorrow ...
      >
      > Cheers,
      >
      > Siegfried Goeschl

        Activity

        Siegfried Goeschl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Henri Yandell made changes -
        Project Commons [ 12310458 ] Commons Email [ 12310474 ]
        Key COM-2249 EMAIL-34
        Affects Version/s unspecified [ 12311647 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Component/s Email [ 12311114 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 35881 12342401
        Hide
        David Eric Pugh added a comment -

        I had to apply it by hand, so there may be some minor formatting changes, but
        everything works.

        Eric Pugh

        Show
        David Eric Pugh added a comment - I had to apply it by hand, so there may be some minor formatting changes, but everything works. Eric Pugh
        Hide
        David Eric Pugh added a comment -

        Siegfried, I tried to apply the patch in this email but no joy. Can you double check that since moving to
        SVN for commons-email, nothing has changed?

        Show
        David Eric Pugh added a comment - Siegfried, I tried to apply the patch in this email but no joy. Can you double check that since moving to SVN for commons-email, nothing has changed?
        Hide
        dion gillard added a comment -

        Created an attachment (id=15789)
        Fix from Sigfried

        Show
        dion gillard added a comment - Created an attachment (id=15789) Fix from Sigfried
        dion gillard created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            dion gillard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development