[英]Yii-Send custom url in mail body using PHPMailer
我有一个webapp可以使用PHPMailer发送邮件。 我生成了一个需要与邮件正文连接的URL。
$url=$this->createUrl($route,$params); //creates url
$mail->Body = $url; // to concatenate with the body.
$mail->MsgHTML($_POST['Model']['body']); // not getting included
该“正文”已覆盖页面的“正文”字段。 如何在电子邮件中包含该网址?
我不完全了解哪个现在可以覆盖另一个,但是通常您可以先将URL与BODY连接起来,然后将其分配给Email。
$url=$this->createUrl($route,$params); //creates url
$body = $_POST['Model']['body'] . $url; // concatenate body with url
$mail->Body = $body; // either this
$mail->MsgHTML($body); // or this (do not know which works for you)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.