Closed wiggitamoo closed 4 years ago
Using the groovyPageRenderer like this can be a bit tricky. The mail plugin provides a way to specify the template and the model directly
mailService.sendMail {
multipart true
bcc bccList.toArray()
from "<email_address>"
subject "Subject"
html view: "/emails/hello", model: [param1: "value1", param2: "value2"]
}
When running Grails in development my application is sending mail correctly. When I run
grails war
and deploy to Tomcat, then I get the following error:This is how I'm using the sendMail command.
When I print out body in development it looks correct. However printing body in production deployed on Tomcat comes back as an empty string.
Is this the intended syntax for sending html mail?