grails / grails-mail

The Grails Mail Plugin
https://grails.github.io/grails-mail/
Apache License 2.0
14 stars 25 forks source link

workaround for config issue in grails3 #4

Closed puneetbehl closed 9 years ago

puneetbehl commented 9 years ago

The Mail plugin is not working with Grails-3.0.1, It seems like the issue is with props: [] in mail configuration and javaMailProperties is not set properly for JavaMailSenderImpl due to

props: [
 'mail.smtp.auth'                  : true,
 'mail.smtp.socketFactory.port'    : 465,
 'mail.smtp.socketFactory.class'   : 'javax.net.ssl.SSLSocketFactory',
 'mail.smtp.socketFactory.fallback': 'false'
]

is transformed into

props: [ mail: [ smtp: [ auth : true, socketFactory: [ port:465, class: 'javax.net.ssl.SSLSocketFactory', fallback: 'false' ] ] ] ]

Here is the github link for the workaround I've implemented https://github.com/puneetbehl/mail/commit/caa33402c41f6ebfe25e54e46f9bcb8b00e8d3cc

felansu commented 9 years ago

Can merge this ?

graemerocher commented 9 years ago

As mentioned in the comments, pull request needs to be revised to just use config.props.toFlatConfig()

graemerocher commented 9 years ago

closed as better pull request applied already