我正在使用芒钻应用程序从我的网站发送电子邮件。我知道如何用Mandrill发送模板。
我想动态地更改模板。我不知道怎么做。在这个站点上,他们提到要使用回车-来动态地改变模板。在这里,他们提到了如何在JSON代码中声明全局合并vars。
我的问题是如何在PHP代码中定义全局合并vars?
发布于 2013-10-07 14:07:29
也许我误解了你的问题,但我的答案是:我假设你当时使用的是mandrill库
require 'Mandrill.php';
$mandrill = new Mandrill($password);
$message = array(
'html' => $html //here you can provide your html for template
//receiver and so on
);
$mandrill->messages->send($message);https://stackoverflow.com/questions/19226815
复制相似问题