Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Complete
-
None
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.