我想把这个邮件格式的动作按钮使用Yii2 ..
因此,相关人员可以通过邮件本身采取某些行动(接受或拒绝).
有没有办法发送加密密钥或其他任何东西,以便特定的用户可以使用邮件自己执行操作.
截至目前我只能发送普通文本正文的邮件,我想发送带有按钮的特定动作链接和这封邮件.
我怎样才能实现这一目标?
任何帮助都会受到高度关注.
提前致谢.
我的控制器代码.
/* Sending Mail Function */
public function Sendemail($request, $receiver, $subject, $email_body) {
$empmodel = Employee::find()->where('EmployeeNo = "' . $request->createdby . '" ')->all();
$data = ServreqItems::find()->where('srno=' . $request->srno)->all();
$content = "<html><body>";
$content .= "<table align='center' width='70%' bgcolor='#e0e0e0' cellpadding='0' cellspacing='0' border='0'>";
$content .= "<tr><td>";
$content .= "<table align='center' width='100%' cellpadding='0' cellspacing='0' style='border:dashed #FFA500 2px; max-width:650px; background-color:#fff; font-family:Verdana, Geneva, sans-serif;'>";
$content .= "<thead>
<tr height='80'>
<th colspan='4' style='background-color:#f5f5f5; border-bottom:solid 1px #bdbdbd; font-family:Verdana, Geneva, sans-serif; …Run Code Online (Sandbox Code Playgroud)