Integrating SendGrid’s SMTP API with CFMAIL

给你一囗甜甜゛ 提交于 2020-01-14 04:12:06

问题


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.


回答1:


You would do this by adding a custom header, using the cfmailparam tag. As such:

<cfmailparam  
    name="X-SMTPAPI" 
    value="{\"category\":\"Cool Emails\"}">

In context of the cfmail tag it would be as follows.

<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>

More can be found in the Adobe Documentation



来源:https://stackoverflow.com/questions/19823780/integrating-sendgrid-s-smtp-api-with-cfmail

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!