我最近在我的SendGrid帐户中创建了一个模板,我想在我的php应用程序中使用它.
我目前正在使用该帐户发送电子邮件,但我必须在我的应用程序内编码html,这不能提供我需要的灵活性.
我在API中找不到一个方法来选择我想要使用的模板并替换变量....
任何的想法?
谢谢
在深入研究 GitHub 后,我发现这个代码片段对我有用......我希望它对你有帮助。要在 v3 中使用模板,代码如下:
$mail->setTemplateId("xxxxxxxxxxxxxxxxxxxx");
// Put your template ID in from the web console after you create a template
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4333 次 |
| 最近记录: |