I want to send a welcome email to the user when they sign up (not an activation email).
I can see the email and edit its text in the Control Panel, but the email doesn't send when a new user registers.
Here is my code:
Event::on(SystemMessages::class, SystemMessages::EVENT_REGISTER_MESSAGES, function(RegisterEmailMessagesEvent $event) {
$event->messages[] = [
'key' => 'after_activate_user',
'heading' => 'When someone registers:',
'subject' => 'Subject',
'body' => 'Message text',
];
});
My question, is there anything else I need to do to get this email to send? Do I need to define a recipient?