Comments (12)
Hey @mustela !
I am on it, sorry for the delay! In my opinion, it might be an error in the template itself, you can try to get the error back with this: http://dev.mailjet.com/guides/?ruby#templates-error-management
from mailjet-gem.
Hey @GuillaumeBadi its not working... would you mind to try it ?
message = { from_email: '[email protected]',
subject: 'Confirmation instructions',
'Mj-TemplateID' => 15205,
'Mj-TemplateLanguage' => true,
'Mj-TemplateErrorReporting' => '[email protected]',
'Mj-TemplateErrorDeliver' => 'deliver',
recipients: [{ email: '[email protected]', name: 'Emiliano' }]
}
Mailjet::Send.create(message)
The email is just blocked and I am not getting any error report... I also created a ticket in the platform since there is no details at all, so I really don't know whats going on in here and I have no answer from you guys.
from mailjet-gem.
Can you give me your APIKEY and a messageID so we can investigate more on our side ?
from mailjet-gem.
ApiKey: 6a961d90f094999b30b5a817d047d2d2
https://app.mailjet.com/reports/emails/1pF6ioKLpP
from mailjet-gem.
We found the error returned by the API which is :
status | error in template language: expression parsing error ## Unknown identifier: var:customer_first_name ## near ## {{var:customer_first_name ##
But in the logs it seems you did not set the Mj-TemplateErrorReporting
Can you send us your template at [email protected]
?
from mailjet-gem.
Ive already fixed the template, but although I've set the Mj-TemplateErrorReporting
prop, I never got an email.
message = { from_email: '[email protected]',
subject: 'Confirmation instructions',
'Mj-TemplateID' => 15205,
'Mj-TemplateLanguage' => true,
'Mj-TemplateErrorReporting' => '[email protected]',
'Mj-TemplateErrorDeliver' => 'deliver',
recipients: [{ email: '[email protected]', name: 'Emiliano' }]
}
Mailjet::Send.create(message)
from mailjet-gem.
I think I finally got the solution! The old wrapper was filtering the properties before sending them, and you were using Mj-TemplateErrorReporting
instead of MJ-TemplateErrorReporting
. anyway, it does not filter anything now, please update the wrapper and everything should work!
from mailjet-gem.
I am closing the issue, please reopen if you encounter any problem 👍
from mailjet-gem.
Cool, thanks, will check!
from mailjet-gem.
Hello, I use java as programming language in order to develop a spring boot microservice can communicate with MailJet API to send an email using my template configurated in my own mailJet dashboard.
I tried to send the mail but I face an error : error in template language
I used the same java code giver by MailJet
I can give you all the details you need to check this error
Can you check @WeshGuillaume for me please
Thanks in advance
Lotfi
from mailjet-gem.
I'm facing the same issue with just a basic hello world email template.
Mailjet::Send.create(messages: [{
'From'=> {
'Email'=> "[email protected]",
'Name'=> "abc"
},
'To'=> [
{
'Email'=> '[email protected]',
'Name'=> 'xyz'
}
],
'TemplateID'=> 12345,
'Subject'=> "Test email using mailjet api",
'TemplateLanguage'=> true,
'Variables'=> {
"firstname" => "xyz"
}
}])
getting this error:
NoMethodError: undefined method `include?' for nil:NilClass
Can you please check @WeshGuillaume
Thanks in advance
Dharani
from mailjet-gem.
$mj = new Client($_SERVER['MJ_APIKEY_PUBLIC'], $_SERVER['MJ_APIKEY_PRIVATE'], true, ['version' => 'v3.1']);
$body = [
'Messages' => [
[
'From' => [
'Email' => "[email protected]",
'Name' => "Trust & Market"
],
'To' => [
[
'Email' => $user_email,
]
],
'TemplateErrorReporting' => [
[
'Email' => "[email protected]",
'Name' => "Web developper"
]
],
'TemplateID' => 5119890,
'TemplateLanguage' => true,
'Subject' => "Votre compte est supprimé !",
'Variables' => json_decode('{}', true)
]
]
];
$response = $mj->post(Resources::$Email, ['body' => $body]);
Same issue using PHP sdk. It is weird. I really dont understand this issue.
from mailjet-gem.
Related Issues (20)
- FATAL -- : [12421295-5b4a-4afa-828e-166f88779600] Net::OpenTimeout (execution expired): HOT 2
- Random 404 Errors HOT 1
- undefined method `merge' for nil:NilClass HOT 1
- Autoloading and Reloading Constants HOT 1
- error 400 while sending HOT 1
- Send a mail with template: error in template language HOT 1
- Rails integration causes an "Initialization autoloaded the constants ActionText::ContentHelper" warning HOT 1
- ActionMailer + Campaigns? HOT 1
- formatted_payload in resource.rb returns incomplete hash HOT 1
- Cannot change delivery method options after initialization of APIMailer HOT 2
- Setting `from` and `reply_to` to `nil` or `''` causes 400 Bad Request HOT 1
- Support for API v4 - SMS API HOT 2
- Possible bug in the `Mailjet::Send.create` method HOT 1
- Read only attribute causing NoMethodError (undefined method `map' for nil:NilClass) HOT 2
- I'm facing the same issue with just a basic hello world email template. HOT 1
- How to use Send API v3.1 and REST API v3 at the same time? HOT 1
- Remove password and API key from exception
- YAJL/json_gem replaces `JSON` in the whole application (not only in the mailjet-gem's context) HOT 2
- Issues using this gem outside of Rails HOT 1
- Ruby on Rails webhook not receiving any events notification
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mailjet-gem.