YII Mail Generate unwanted ascii character in HTML mail
Posted
by
CedSha
on Stack Overflow
See other posts from Stack Overflow
or by CedSha
Published on 2012-11-09T10:58:17Z
Indexed on
2012/11/09
10:59 UTC
Read the original article
Hit count: 291
yii
|swiftmailer
I use YII-Mail just by copying the sample but I always get some ascii charcters in my generated links Where they come from and how to avoid them ?
$message = new YiiMailMessage;
$message->view = 'mail';
$message->setBody(array('model'=>$model), 'text/html');
$message->subject = Yii::t('tr','my subject');
$message->addTo('[email protected]');
$message->from = '[email protected]';
Yii::app()->mail->send($message);
and in view file 'mail'
<h1><?php echo(Yii::t('tr','This is HTML mail')); ?></h1>
<?php echo CHtml::link('Mylink', array('controller/view', 'id'=>$model->id)); ?>
The resulted email source looks like this
<h1>This is HTML mail</h1>
<a href=3D"/testdrive/index.php?r=3D ....
© Stack Overflow or respective owner