In this tutorial we're going to learn how we can send an email to the application admin user when a new user registers to your Laravel application. In this example we're going to use events and listeners to know when a user has registered and the listener will then send an email to the admin of the application. https://paulund.co.uk/laravel-send-email-when-new-users-register#undefined When using Laravel it has a built in way you can generate the boilerplate files for handling registration and logins for your application.

The listener will need to take the user from the event class and send an email to the global mail.from.address.

That's it, that's all the code you need to send the admin an alert when a new user registers to your application.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners