@Component public class SendEmailDirective extends AbstractTemplateDirective
参数列表
email
:多个邮件地址
cc
:多个抄送地址
bcc
:多个密送地址
title
:标题
templatePath
:内容模板路径
content
:邮件内容,templatePath为空时有效
fileNames
:多个附件名称
filePaths
:多个文件路径
parameters
:参数map
返回结果
result
:是否允许发送,【true,false】
<@tools.sendEmail email='master@puliccms.com' title='title' content='content' parameters={"parameter1":"value1"}/>
<script> $.getJSON('${site.dynamicPath}api/directive/tools/sendEmail?email=master@puliccms.com&title=title&content=content¶meters.parameter1=value1&appToken=接口访问授权Token', function(data){ console.log(data.alias); }); </script>
限定符和类型 | 字段和说明 |
---|---|
private EmailComponent |
emailComponent |
private MetadataComponent |
metadataComponent |
private TemplateComponent |
templateComponent |
ADVANCED, AUTH_TOKEN, AUTH_USER_ID, siteComponent
log
构造器和说明 |
---|
SendEmailDirective() |
限定符和类型 | 方法和说明 |
---|---|
void |
execute(RenderHandler handler) |
boolean |
needAppToken() |
execute, expose, getAdvanced, getApp, getSite, getUserId, needUserToken, supportAdvanced
execute, getName, getNamespace, getShortName, httpEnabled, setName, setNamespace, setShortName
private EmailComponent emailComponent
private TemplateComponent templateComponent
private MetadataComponent metadataComponent
public void execute(RenderHandler handler) throws java.io.IOException, freemarker.template.TemplateException
java.io.IOException
freemarker.template.TemplateException
public boolean needAppToken()
needAppToken
在类中 AbstractTemplateDirective