Uploaded image for project: 'Commons Email'
  1. Commons Email
  2. EMAIL-34

[email] Allow access to MimeMessage from Email class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • Operating System: other
      Platform: Other

    • 35881

    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

      Attachments

        Activity

          People

            Unassigned Unassigned
            diongillard dion gillard
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: