How to register a new System Message email
This will only register your message with Craft. To then send it you would do something like this:

Event::on(
    Elements::class, 
    Elements::EVENT_AFTER_SAVE_ELEMENT,
    function(Event $event) {
        if ($event-&gt;element instanceof \craft\elements\User) {
            $user = $event-&gt;element;
            if($event-&gt;isNew) {
                Craft::$app
                    -&gt;getMailer()
                    -&gt;composeFromKey('after_activate_user')
                    -&gt;setTo($user)
                    -&gt;send();
            }
        }
    }
);


This will listen for the EVENT_AFTER_SAVE_ELEMENT event, make sure it's a User being saved, check that it's a new user then send the message.