I've read a few posts about building different email bodies including form data and that has given me a good idea of what needs to be done. What we are trying to do is probably a bit more simple and I would just like to determine the best approach.
For each form we would like to have a custom email body, it doesn't need to contain any form data, just be different for each form.
I see two potential ways to approach this since it can't be put into the properties-local.xml like other email options, i.e. subject or sender.
1. We could amend the 'email-form.xpl' and the 'resources.xml' to determine via a variable the form name and then use a specific email-body from 'resources.xml' based on the form name.
2. We could direct the forms to use specific versions of 'email-form.xpl' and 'resources.xml', something like 'email-formA.xpl' and 'resourcesA.xml' which would essentially be replicas of the originals just with the changes we need.
Yes that will be perfect for now for some reason I thought this had been removed as it was in the old documentation but not in the new.
Long term we would want different emails going to different people:-
- Form owner
However this might be better suited to an API call based on hidden fields or something on time of submission. Various email gateways have REST APIs. It would be interesting to know if anyone else has experience doing this.