Level 50
May 26, 2017
1
Level 1
Url in email includes an ending curly bracket %7D
I have an email that is generated when a user registers or requests to resend their activation email.
The url in the email ends with the end }
Here is my Activation class
class Activation extends Mailable
{ use Queueable, SerializesModels;
public $activation;
public $username;
public $url;
/**
* Create a new message instance.
*
* @return void
*/
public function __construct($user)
{
//
$this->activation = $user->activation_key;
$this->username = $user->username;
$this->url = route('user.activate', $user->activation_key);
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
\Log::info('EMAIL DELIVERY :: New Registration');
return $this->view('mail.activation')
->from('[email protected]')
->subject('Activation');
}
}
And here is my template activation.blade.php
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<div class="container">
<h2>Welcome {{$username}}</h2>
<p>Thanks for joining.</p>
<p>To finalize your account, just click the link below to activate it, and then you can post.
</p>
<p><a href="{{$url}}" style="padding: 10px; background-color: indianred; color: white;">Turn
Me On.</a></p>
</div>
<footer></footer>
</body>
</html>
The above, would give me a url like:
http://dpp.app/user/activation/8ff4013e-421b-11e7-97c8-08002732ed09%7D
The tail end includes the curly bracket. Anyone see why I am getting this?
Thanks Rich
Please or to participate in this conversation.