如何在 mailgun 中使用变量?
在测试电子邮件(test@example.com)中,我添加了以下变量
{"age": 20}
Run Code Online (Sandbox Code Playgroud)
但它并不像创建邮件时使用的那样。
这是发送邮件时的代码。
$mailformat = "CODE HTML :D";
$result = $mgClient->sendMessage($domain, array(
'from' => 'Example <example@example.com>',
'to' => 'test@example.com',
'subject' => '%recipient_fname%, testing mail',
'html' => $mailformat
));
Run Code Online (Sandbox Code Playgroud)