Send different welcome emails to new users based on their roles

In the afterRegister event handler (see the screenshot below), apply the following logic:

IF the user role is "admin"
  send email template "welcomeAdmin"
IF the user role is "regularUser"
  send email template "welcomeRegularUser"

Event Handlers - BL - ConsoleDemo - Backendless 2023-07-11 16-40-11

Event handlers can be created in the BACKEND section of Backendless Console on the Cloud Code screen: