【发布时间】:2019-09-14 21:48:19
【问题描述】:
`我正在使用mailgun 在我的网站中设置邮件功能。我可以使用 mailgun API 发送邮件,包括文本和 HTML 内容。但是,我需要发送带有日历附件的邮件,但在 ColdFusion 中找不到更好的方法。谁能帮帮我?
<cfhttp result="result" method="POST" charset="utf-8"
url="https://api.mailgun.net/v3/sandbox0000000000000000000.mailgun.org/messages" >
<cfhttpparam type="header" name="Authorization"
value="Basic #ToBase64("api:***********************************79")#" />
<cfhttpparam type="formfield" name="from"
value="postmaster@sandbox0000000000000000000.mailgun.org" >
<cfhttpparam type="formfield" name="to" value="me@test.com" />
<cfhttpparam type="formfield" name="subject" value="mail content" />
<cfhttpparam type="formfield" name="text" value="mail content from test account" />
<cfhttpparam type="formfield" name="attachment" value="my path" />
</cfhttp>
【问题讨论】:
-
提示,CFML 等基于标签的代码必须缩进四个空格,否则将不可见。您也可以在编辑器中使用代码按钮
{}。
标签: coldfusion gmail icalendar mailgun coldfusion-10