Taking the blog Assignment Notification task, customization and custom messages one step further, here is an explanation how to send emails, which are based on the message templates editor in Web Dynpro, in all different kind of tasks.
The basis therefore is the chapter Sending custom messages.
There is no real need to create your own message class for your custom emails, so first, create an email message template in Web Dynpro:
Create a custom task like described in Sending custom messages. As recommendation, put the NOTIFICATIONTASKID into the NOTIFICATION Repository as task reference, and reference to it in the job.