Commons Email
  1. Commons Email
  2. EMAIL-9

[email] Issue with host settings in a shared Server environment

    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: All

      Description

      So the quick and dirty is I'm setting up an HTMLEmail and the server is in a
      shared environment, there is another site on the server using commons-email, and
      I have no control over that site. I set the hostname and the authentication but
      after that it's taking the settings from the System.properies. Below is a snip
      from my code.

      org.apache.commons.mail.HtmlEmail email = new org.apache.commons.mail.HtmlEmail();
      email.setHostName(server);
      email.setAuthentication(username, password);

      After that point I can get the session:
      Session sess = email.getMailSession();
      sess.getProperty("mail.smtp.host");
      and the result of the getProperty("mail.smtp.host") does not equal the setting
      from the above server variable. It is now set to the value from
      System.propeties, again, not my setting.

        Activity

        Hide
        dion gillard added a comment -

        That definitely looks suspicious.

        Show
        dion gillard added a comment - That definitely looks suspicious.
        Hide
        Ben Speakmon added a comment -

        I don't see anything obviously wrong in the code; I modified the test case to perform these exact steps and it still passed.

        Is this still a problem?

        Show
        Ben Speakmon added a comment - I don't see anything obviously wrong in the code; I modified the test case to perform these exact steps and it still passed. Is this still a problem?
        Hide
        Paul J DeCoursey added a comment -

        I think this was fixed. I thought that it got closed out already too. I discovered what the issue was a few days after I reported this, and then discovered that it had been fixed already, we just had an older jar.

        Show
        Paul J DeCoursey added a comment - I think this was fixed. I thought that it got closed out already too. I discovered what the issue was a few days after I reported this, and then discovered that it had been fixed already, we just had an older jar.

          People

          • Assignee:
            Unassigned
            Reporter:
            Paul J DeCoursey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development