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

[email] Support SMTP Envelope From (bounce address)

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Nightly Builds
    • None
    • None
    • Operating System: other
      Platform: Other

    • 18968

    Description

      A patch providing "bounce address" support for Email.java, as discussed in the msg copied below. Patch also "clones" System.properties rather than setting properties upon it directly.

      At 6:04 PM -0500 4/10/03, Quinton McCombs wrote:
      > ----Original Message----
      > From: Joe Germuska Joe@Germuska.com
      > Sent: Thursday, April 10, 2003 3:15 PM
      > To: Jakarta Commons Developers List
      > Subject: [email] email bounce address?
      >
      >
      > I'm interested in porting some of my email projects to use the
      > commons-email package. However, there is one thing I'm accustomed to
      > using that isn't supported.
      >
      > Sometimes my system needs to send an email from a certain user, but
      > if the message bounces, I need the bounce to go to another address
      > instead of to the sender. It turns out that the way to do this is to
      > set the "mail.smtp.from" property in the Session object before
      > sending a message.
      >
      > It looks like adding this would be no big deal, since a new Session
      > is created every time a message is sent. So if people support
      > adding this functionality, it would be as simple as defining another
      > property on the Email object (like "bounceAddress"), and then if that
      > property isn't null, to set "mail.smtp.from" in the properties used
      > to create a new session in getMailSession().
      >
      > Looking at that code, I suppose that one might just set this value as
      > a system property, but especially since the mechanism is kind of
      > obscure, it might make the code easier for people to use if it were
      > more explicit. Also, it seems kind of transient and
      > more-appropriately set per-message than globally in the System
      > properties.
      >
      > Which brings up just one other thing: in getMailSession(), there are
      > calls to System.setProperty(). This makes me a little uncomfortable;
      > is there any reason not to make a new Properties based off of
      > System.getProperties, and then to set the values on a more transient
      > object?
      >
      > Opinions?

      All of this sounds good to me.

      Attachments

        Activity

          People

            Unassigned Unassigned
            germuska Joseph Lad Germuska
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: