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

Create an overridable method in Email.java to create the MimeMessage instance

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.1
    • 1.2
    • None
    • All Java

    Description

      I would like more control over the MimeMessage instance that is created by Email.java in buildMimeMessage().

      Currently it simply instantiates one directly - new MimeMessage(). It would be nice if it called a protected method called something like createMimeMessage(session) so that I could override that with my own subclass.

      Why would I want to subclass it? So I can set the Message-Id on the outgoing message. See this link:

      http://java.sun.com/products/javamail/FAQ.html#msgid

      I've got my own subclass ready but I have no way to hook into Email.java to use it.

      Attachments

        1. EMAIL-74-patch.txt
          0.8 kB
          Corey Scott

        Activity

          People

            sgoeschl Siegfried Goeschl
            jim_mccabe Jim McCabe
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified