it's a good thing to have all mail text in one central place and send them via rules.
but some of the configuration is still in the rule: mail addresses.

even better would it be if we can set default from and to addresses.
(which can be overridden in the rules send action)
so all the configuration is in one place.

Comments

guillaumev’s picture

We can discuss this, but I think the email addresses should stay within the rules. Imagine you want to send the same email (with the same text and subject) in 2 different rules (so at different times) but not to the same recipient (I think this is a use case that can definitely happen). If we have default from and to addresses built in the variable, you would have to create 2 different variables for this use case. If however we keep a variable as a simple email subject and body, you can very easily fit the use case and send the same email to different recipients. Also, if you want to send the same email to the same recipient but in 2 different rules, you can easily use a rule component...

Please feel free to expose your arguments for this...

geek-merlin’s picture

yes, we're on the same train: proposal is to have default mail addresses per mail template AND be able to override them in rules.
(with something like "leave this empty to use default address")

so we can smash both use cases
* (default) mail address conf with the template
* (overridden) mail address conf in rules

what u say?

geek-merlin’s picture

Status: Active » Closed (won't fix)

NO, we even should go one step further which makes more sense:
a mail address is not a property of a mail template - it often is used for different templates.
and it should not be a literal in the send action.
so it has to be a variable and we need #1434854: Define variables per UI and make them exportable/featurable

so this is a wontfix.