Giter Site home page Giter Site logo

Comments (12)

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

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.

mustela avatar mustela commented on August 17, 2024

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.

screenshot 2016-03-11 16 56 32

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

Can you give me your APIKEY and a messageID so we can investigate more on our side ?

from mailjet-gem.

mustela avatar mustela commented on August 17, 2024

ApiKey: 6a961d90f094999b30b5a817d047d2d2
https://app.mailjet.com/reports/emails/1pF6ioKLpP

from mailjet-gem.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

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.

mustela avatar mustela commented on August 17, 2024

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.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

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.

WeshGuillaume avatar WeshGuillaume commented on August 17, 2024

I am closing the issue, please reopen if you encounter any problem 👍

from mailjet-gem.

mustela avatar mustela commented on August 17, 2024

Cool, thanks, will check!

from mailjet-gem.

lotfi10 avatar lotfi10 commented on August 17, 2024

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.

dharani-gaddam avatar dharani-gaddam commented on August 17, 2024

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.

BigWenceslas avatar BigWenceslas commented on August 17, 2024
$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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.