Hello,
I am working on a questionnaire with multiple languages and need to send automated emails using the mailSend() function. I would like the email to be sent in the same language as the questionnaire the respondent is currently taking.
Here is my current PHP code:
$voucher = readGET('voucher_code', true);
if (trim($email) !== '' && trim($voucher) !== '') {
mailSend($email, 2, 0, $voucher);
}
My question: Is there a way to specify the language when using mailSend(), so that the email is automatically sent in the respondent's current questionnaire language?
I have looked at the documentation for mailSend() but couldn’t find a clear indication of how to handle multilingual emails dynamically based on getLanguage(). I would like to avoid having to create separate email templates for each language.
For context, I have already set up the language in the contact file, and respondents receive the invitation email in the correct language.
Thanks a lot