将SendGrid的SMTP API与CFMAIL集成 [英] Integrating SendGrid’s SMTP API with CFMAIL
本文介绍了将SendGrid的SMTP API与CFMAIL集成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用 SendGrid的SMTP API (而非WEB API),并正在考虑使用 cfmail
发送电子邮件。如果我使用 cfmail
发送电子邮件,并想使用 X-SMTPAPI
头部, cfmail
是一个地方吗?请澄清。
I am using SendGrid’s SMTP API (not WEB API) and am considering sending an email using cfmail
. If I use cfmail
to send the email, and want to use the X-SMTPAPI
header somewhere, do you think that cfmail
is a place to do that? Please clarify.
推荐答案
您可以通过添加自定义标题,使用 cfmailparam
标记。因此:
You would do this by adding a custom header, using the cfmailparam
tag. As such:
<cfmailparam
name="X-SMTPAPI"
value="{\"category\":\"Cool Emails\"}">
在 cfmail
如下。
<cfmail
from="you@example.com"
to="nick@sendgrid.com"
subject="I am using CF Mail to do this!">
<cfmailparam
name="X-SMTPAPI"
value="{\"category\":\"Cool Emails\"}">
Look at my awesome use of cfmail!
</cfmail>
这篇关于将SendGrid的SMTP API与CFMAIL集成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文