Inject an IMessageManager messenger;
Call send: void Send(ContentItemRecord recipient, string type, string service, Dictionary<string, string> properties = null);
Write a class that inherits from IMessageEventHandler ...
Write a method void Sending(MessageContext context)
It checks for the service string and if it recognizes the message handles formatting it into the Subject and Body of the message.
Search for these in the source code and you'll see how they are used.