Closed carjimfa closed 1 year ago
Hello @carjimfa, thanks for raising this issue!
to use template template variables, parameter TemplateLanguage should be set to true. From the documentation When true, activates the template language processing. Default value: false
this can be done with such code:
email.WithTemplateLanguage(true);
Anyway, I think it makes a sense to set this parameter by default to true in SendTransactionalEmailsAsync if any variables are passed, to make the usage easier.
Hi I have the same exact problem as carjimfa I'm converting our call done with v1.2.2 to 2.0.2 ( i can't find any doc on breaking change between v1 and v2 )
We were using Post(MailjetRequest) and some nodes keys have changed so i have tried to update ex : from => fromEmail and FromName => the emails are sent but all users put in cc and bcc are ignored I using Mailjet.Client.Resources.Send constants so i don"t understand how i can badly set these keys for cc and bcc
So i have decided to move to TransactionalEmail Everything work well (to, cc, bcc) except for the feature of templateId When i'm setting WithTemplateLanguage(true) and if i set it to false the email is received but without any replacement of vars
Any idea ?
this is the language set in this template
Hello, I couldn't reproduce the issue. Transactional email is sent successfully with Français language and all variables are replaced.
If the issue still persists please post more details such as a sample code that creates a request and an example of a template.
This is closed due to inactivity. Feel free to re-open in case of need.
Hello community,
We are sending transactional emails using this library and recently started using templates instead of plain HTML. We have created a few templates in Mailjet but we are unable to set the variables properly. We are using TransactionalEmailBuilder like this:
But when sending, the footer looks like this:
I don't know but I'm trying to use this new feature because I was getting the same error as in issue 70 when sending with JObject and mostly the code provided when setting up a new template:
"StatusCode": 400, "ErrorInfo": "At least FromEmail or Sender must be provided"
We are using Mailjet library v 2.0.2 so the client now decides which API version to use so not much more to say about the error (there isn't one actually, just the result is not the expected).
We are using .Net Core 2.2.
Is someone else having problems with this builder? Is there a workaround? Are we doing something wrong?
Thanks in advance.