如何将变量传递给邮件枪默认电子邮件模板



我使用mailgun并与php集成。邮件发送正常,没有错误。我在邮件枪(操作模板(中创建了一个默认模板。在该模板中有一个按钮。我的问题是

如何将参数传递给该按钮一个标签 我的代码是

$mg = Mailgun::create('MY API');
// Now, compose and send your message.
$result = $mg->messages()->send('MY DOMAIN NAME', [
'from' => 'support@figjam.net',
'to' => $email,
'subject' => 'Confirm Your E-mail',
'html' => ' <p>Please confirm your email address by click the link below <br>
<a href="'.$base_url.'/activate.php?id='.base64_encode($lastID).'"><button type="button" class="btn btn-secondary">CLICK TO ACTIVATE YOUR ACCOUNT</button></a></p>'
'template'    => 'verifyemail'      
]);

我需要将变量传递给该模板验证电子邮件

请帮我解决这个问题。 谢谢

假设您有值someVariableValuemyvariable

'template'    => 'verifyemail',
'v:myvariable' => 'someVariableValue',
]);

相关内容

最新更新