0
我試圖生成我的HTML電子郵件模板鏈接:CakePHP 1.3。 - 與HTML幫助鏈接生成未在電子郵件模板工作
<?php echo $html->link('Find a shop', array('controller' =>'shop', 'action' => 'search'), array('escape'=>false,'target'=>'_blank')); ?>
我希望像一個鏈接:http://shopexample.localhost/shop-search但只產生商城 - 搜索沒有http://shopexample.localhost
控制器的邏輯是使用EmailComponent
$this->Email->to = $to;
$this->Email->subject = $subject;
$this->Email->replyTo = $replyTo;
$this->Email->from = "Me <".$from.">";
$this->Email->template = $template;
$this->Email->body = $body;
$this->Email->sendAs = 'html';
$this->Email->smtpOptions = Configure::read('SMTP.Options');
$this->Email->delivery = 'smtp';
if($to!=null){
if($this->Email->send()){
$this->Email->reset();
}
}
HTML幫助是包括在內。我正在使用CakePHP版本1.3。
感謝