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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners