[Vtigercrm-developers] use email templates with webservices

lucia digirolamo l.digirolamo at websonica.net
Fri Dec 16 15:21:12 GMT 2016


Hi,

I wonder if there is a way to use email templates with webservices. I'll 
explain better:

I have a workflow to fire a custom function. This custom function has to 
send some emails based on some conditions. Until now I have used the php 
mail function, but that implies that the body of the email is in the php 
code. What I'd like to have in my custom function is something like that:

IF condition1 THEN send template1

IF condition2 THEN send template2

etc

where templateX is the vtiger email template.

This way my clients could edit the body of the email without the need of 
calling me to edit the php code.

PS:
I know that I can send email directly inside the workflow, but the 
conditions I need are not possible within the normal workflow, that's 
why I need to call the custom function to set the body of the email 
depending of those particular conditions.





More information about the vtigercrm-developers mailing list