I have 2 areas of questions on custom emails. I’m using PHPMailer in a trigger file already, but I want the system users to be able to modify email templates as needed. So PHPMailer is not the ideal solution if I want to use the templates. These will be used in a cron to give ongoing order status updates to customers, notification of new orders entering the system, internal status updates, etc.
1.) I’m looking for a list of existing codes for use in the email templates. The admin is specifically asking for a code, but does not provide a list. I see a small number of existing ones like “(SendingEmailOnAutoSubscription)” in the admin, but I have not come across a full list, or what best practices are for creating new ones. Should it correspond to the module name or can it be anything for our own reference?
2.) What hook or class do you call to to utilize/send a custom email template in a custom module?