Blame view
app/Services/Registration/ActivationKeyMailer.php
762 Bytes
e77200db5 Initial commit |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<?php namespace FootyRoom\Services\Registration; use Illuminate\Contracts\Mail\Mailer; class ActivationKeyMailer { /** * @var \Illuminate\Contracts\Mail\Mailer */ protected $mailer; public function __construct(Mailer $mailer) { $this->mailer = $mailer; } public function send($userId, $username, $email, $key) { $this->mailer->send( ['emails.activation', 'emails.activationAsText'], ['userId' => $userId, 'activationKey' => $key], function ($m) use ($username, $email) { $m->from('donotreply@footyroom.com', 'FootyRoom'); $m->to($email, $username); $m->subject('Welcome to FootyRoom'); } ); } } |