开发者

How to set the content type with Grails mail plugin?

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?


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 "recipient@recipient.com"
            from "someone@place.com"
            subject "Email without gsp"
            html "some markup"
        }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜