Closed sayinmehmet47 closed 1 year ago
Hi @sayinmehmet47 it should be a 'Mj-TemplateLanguage': true
property not a TemplateLanguage
.
Here's a detailed documentation on that, please take a look.
@ai-wintermute thanks for your answer.I dont know if is is the case. I also defined it in the header and tried the Mj-TemplateLanguage=true. but did not worked for me. HERE how is I defined it
async sendMail(mailDto: MailDto) {
const sendMailOptions: ISendMailOptions = {
to: mailDto.to,
from: mailDto.from ?? this.defaultMailFrom,
text: mailDto.text,
subject: mailDto.subject,
html: mailDto.html,
headers: {
'X-MJ-TemplateID': mailDto.template || '',
'X-Mj-TemplateLanguage': '1',
'X-MJ-Vars': JSON.stringify(mailDto.variables || {}),
'X-MJ-TemplateErrorReporting': '1',
},
};
this.logger.debug('sendMail', JSON.stringify(sendMailOptions));
try {
await this.mailerService.sendMail(sendMailOptions);
} catch (error) {
this.logger.error('Sending Mail failed', error);
}
}
I am using mailjet to send notification to user if they upload a file. So I created a template like that
But when i got the message it only send the title and first description part, it does not send the template language part.
I dont know if I send the request wrongly. That is how I implemented the request
am I need to activate sth to show also template language part? I also tried it with TemplateLanguage: true, but does not show that part.