File: D:/HostingSpaces/netwerkbrabant/netwerkbrabant.nl/app/Mail/UserResetPasswordMail.php
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Support\Facades\Log;
class UserResetPasswordMail extends Mailable
{
use Queueable, SerializesModels;
/** @var string $token The password reset token */
private $token;
/** @var string $email The email */
private $email;
private $siteUrl;
/**
* Create a new mail
*
* @param string $token The password reset token
*/
public function __construct(string $token, string $email)
{
$this->token = $token;
$this->email = $email;
if(config('app.env') !== 'production') $this->siteUrl = 'http://netwerkbrabant.komma.pro';
else $this->siteUrl = config('site.company.url');
}
/**
* Build the message.
*
* @return $this
*/
public function build()
{
Log::info(self::class.': Send');
return $this->view('site.emails.passwordForgotten')
->subject(trans('site/emails.passwordForgotten.subject'))
->to($this->email)
->with(['token' => $this->token, 'siteUrl' => $this->siteUrl]);
}
}