gpc / grails-mail

The Grails Mail Plugin
http://grails.org/plugin/mail
Apache License 2.0
45 stars 85 forks source link

Option to set subject and text by message code #35

Closed davidkron closed 7 years ago

davidkron commented 7 years ago

I think it would be useful to have the option to set a mail's subject and text content by providing a message code. As a developer, the advantage is that I don't have to include the messageSource myself and with the already available "locale" option subject and text could be translated to the correct locale.

Code example:

mailService.sendMail {
    locale user.languageForCorrespondence
    subject 'mail.summary.subject'
    text 'mail.summary.text'
}