FutureWeb
3 years ago

Send welcome email on user registration

Posted 3 years ago by FutureWeb

I am trying to send a welcome email when a user registers Laravel 5.2, I have the following code in my Auth controllers user create method:

        $user = User::findOrFail($id);
        Mail::send('emails.welcome', $user, function($message) use ($user)
        {
            $message->from('[email protected]', 'xxxx.uk');
            $message->subject("Welcome to xxxxx.me.uk");
            $message->to($user->email);
        });

just before the return but it does not fire I get no errors or exceptions but I get no mail either its driving me up the wall!

Please sign in or create an account to participate in this conversation.