$body .= “<a href='pruebar/web/index.php?r=registro/confirm&id=”.$id."&authKey=".$authKey."’>Confirmar</a>";
$body .= “<a href='pruebar/web/index.php?r=registro/confirm&id=”.$id."&authKey=".$authKey."’>Confirmar</a>";
You should use "Html::a()" to create a link.
$body .= Html::a('Confirmar', ['registro/confirm', 'id' => $id, 'authKey' => $authKey]);
Guide > Html helper > Hyperlinks
http://www.yiiframework.com/doc-2.0/guide-helper-html.html#hyperlinks
Guide > Url helper > Creating Urls
http://www.yiiframework.com/doc-2.0/guide-helper-url.html#creating-urls
By using these methods in Yii, you can always create a valid url whether you will enable ‘pretyUrl’ or not.
[/pruebar/web/registro/confirm?id=133&authKey=20fe3e28bec6989c4fc7cb2e9ecea27c6866d951777b2d8a7aba59c24aee29d585b45a600706a75e8b73cc4bcde4960489f7b0548c78f7f8722116ab35c1d9296301fd3fd8cf2d885ea646e08483f224230110ef19fc49fe01115b1ca82b02f5c9d70876]Confirmar
in my email i dont have a link only the rute :c how to resolve this problem?
Oh, I’m sorry. You are composing a mail text in which the link should be an absolute one.
Try the following:
$body .= Html::a('Confirmar',
Url::to(['registro/confirm', 'id' => $id, 'authKey' => $authKey], true)
);
Please check the API reference of HTML::a().
thanks for all the problem is solved and i check the API