Mimemail has the ability to apply different templates for different mail messages if given a name (key) for the mail message. So, for example, a site can have different views prepared with views_send for different mailing lists or circumstances, each view having a custom template.
To do this, views_send must be modified in order to pass the view name in the message content rather than pass the value 'direct' as the key.
@hansfn this in outline is the solution I have devised for this Backdrop version:
the name of the view is available when preparing the message and needs to be passed through the mail system to be used by Mimemail when invoking a specific template.
the way I have done this is to add it to the mail message as an additional custom header with name View-name.
it then gets included with other headers when either passed forward directly or via the email spool
the function views_send_mail has to be modified to apply in all cases, not just when $key == direct.
I am writing this here in order to record this divergence from the D7 and D8 versions of the module. Your views are very welcome.
This issue was first raised in issue #7
Mimemail has the ability to apply different templates for different mail messages if given a name (key) for the mail message. So, for example, a site can have different views prepared with views_send for different mailing lists or circumstances, each view having a custom template.
To do this, views_send must be modified in order to pass the view name in the message content rather than pass the value 'direct' as the key.