Reputation: 92509
The Grails mail plugin documentation shows only how to set the content type with GSP templates:
<%@ page contentType="text/html"%>
But I don't use GSP (and will not!) and produce a String with FreeMarker. Is there a way to set the content type without using GSP?
Upvotes: 1
Views: 776
Reputation: 385
If you use the html statement in the sendMail method the plugin will set the content type for you. The sendMail command can be used without requiring a gsp template.
mailService.sendMail {
to "[email protected]"
from "[email protected]"
subject "Email without gsp"
html "some markup"
}
Upvotes: 1