Download & Extend

Use unique mailkeys for Rules messages

Project:Mime Mail
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

I'm not sure if I'm just missing something or if this is a feature request.

I use Rules to dispatch a number of different e-mails, but they all have the same mailkey ("mail-mimemail-rules-action-mail"). Since the theming filename suggestions use this mailkey I haven't been able to find a way to theme each of them differently. It seems that this would be a fairly common situation, so perhaps I am confused.

(In the meantime, I'm thinking about using a formatless mimemail.tpl.php and an empty mail.css. This way I believe I can include the necessary css and template html inline in the HTML e-mail content field for each action.)

Thanks!

Comments

#1

IMHO the solution would be using different mailkeys for different Rules. I will take a look at it.

#2

Thanks sgabe.

I just noticed that the e-mail subject is available in mimemail-message.tpl.php (I mistyped this filename above). For the time being, I can use some conditional logic in that file to accomplish what I'm needing based on this variable.

#3

Just to know if i'm on the right track. I wanna send an html mail with mimemail+rules from a specific node-type. To have a custom output, would I have to do a tpl.php file called mimemail-mail-mimemail-rules-action-mail.tpl.php (or will it need some other name) and define some classes in mail.css ?

Then, to have different templates, I could do this with something like if($recipient ==.. or if($subject == ...

Thanks for providing some enlightment

#4

Title:Different Templates for Same Mailkey» Use unique mailkeys for Rules messages
Category:support request» feature request

I am changed the issue settings to better reflect the situation.