Is it possible to pass a variable to an email template with the email form plugin?

usdc-or

Member
I have a fairly complex email form plugin template that I'm using to send emails of task lists to different groups of people. The tasks change based on who the email is going to. I like reusing my code so I've created a template for each group that sets the group name and then calls includes for the rest of the code, but that requires a separate template for each group just for one small line of code.

I was wondering if I could set the variable in the plugin screen somewhere... for example, 1st instance of email plugin sends HR an email with generic template, $groupname = HR. 2nd instance going to IT uses same template but sets $groupname to IT (for use in that template).
 
Hmmm. No, at the moment, I don't see a way.

I'd probably have to add some functionality to the plugin ... like maybe an "Eval" option for the basic "Message Text", so you could handle it all yourself, by just including and running your own code, like ...

Code:
require_once JPATH_ROOT . '/path/to/your_class.php';
return YourClass::emailMsg('foo');

I'll go ahead and do that when I get a minute. Remind me if I haven't responded within a day or two.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top