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

EmailConstants.MAIL_SMTP_FROM value is incorrect

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.3
    • 1.4
    • None

    Description

      Per the JavaMail Javadoc (https://javamail.java.net/nonav/docs/api/), the standard property for the from address is "mail.from", not "mail.smtp.from".

      This incorrect value causes sending emails to fail if using a Session provided by an EE container that properly sets the from address. Observed on WildFly 8.2.0.Final.

      Workaround: add the "mail.smtp.from" value to the session properties. You don't need to set the actual value, the fact that it's there is enough:

      session.getProperties().setProperty(EmailConstants.MAIL_SMTP_FROM, "");

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            rcd Richard DiCroce
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment