Configuring sendmail to use variable record templates
I have code working nicely to send offer letters to applicants from Uganda:
sendmail
[
from :sender_text
to :application_record.Email
cc:application_record.Email2,application_record.Allocated_to.Email
reply to :zoho.loginuserid
subject :"Offer of tools, Reference " + application_record.Application_Ref
message :message_text
Attachments :template:Offer_letter_Uganda:Application application_id as inline
]
However, applicants can also come from 5 other countries, and the record template needs to be different for each country.
Is there any way to put the attachments line into a variable, like I the message_text variable, so I can just build the template name as I go? Or do I have to code the whole sendmail into a giant if statement with 6 nearly identical options?