Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-2543

<mail:outbound-channel-adapter>: 'host' shouldn't be required, when 'java-mail-properties' is defined

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: None
    • Fix Version/s: 5.1.3
    • Component/s: Mail Support
    • Labels:

      Description

      For 'java-mail-properties' ref we can use a properties with some posible list:
      Here http://www.websina.com/bugzero/kb/javamail-properties.html
      and here http://connector.sourceforge.net/doc-files/Properties.html
      So, if we define 'java-mail-properties' like this:

      [email protected]
      mail.smtp.host=smtp.gmail.com
      mail.smtp.port=587
      mail.smtp.starttls.enable=true
      mail.debug=true
      

      adapter config will be very simple:

      <int-mail:outbound-channel-adapter id="sendMail" java-mail-properties="javaMailProperties" password="somepassword"/>
      

      And as you can see, there is only one direct property - password.
      We can provide some our own 'JavaMail' property 'mail.password' and document it , but I think it will aberration.
      Also it is a bug : https://github.com/SpringSource/spring-integration/blob/master/spring-integration-mail/src/test/java/org/springframework/integration/mail/config/MailOutboundChannelAdapterParserTests.java#L86
      lines 85 & 86 should be swapped.

        Attachments

          Activity

            People

            Assignee:
            abilan Artem Bilan
            Reporter:
            abilan Artem Bilan
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: