Git Product home page Git Product logo

Comments (10)

Nightbr avatar Nightbr commented on July 26, 2024 1

@Zhivko-Mailjet Hey, we need support here ty ;)

@kahunafr You need to give us more info (what is your code? what is the error (more than it doesn't work). Add to that if you're using the APi V3 (and not the API V3.1) it's not Variables but Vars. Please read the documentation https://dev.mailjet.com/guides/#personalisation-v3

from laravel-mailjet.

Zhivko-Mailjet avatar Zhivko-Mailjet commented on July 26, 2024 1

@kahunafr
Indeed, try using Vars instead of Variables.
Also. try with 'MJ-TemplateLanguage' => true instead of 'TemplateLanguage' => true

from laravel-mailjet.

kahunafr avatar kahunafr commented on July 26, 2024 1

Thank you @Zhivko-Mailjet now it's ok!
Thanks also to @Nightbr

from laravel-mailjet.

Nightbr avatar Nightbr commented on July 26, 2024

Hey, look here: https://github.com/mailjet/MailjetSwiftMailer

This package use SwiftMailer and we have created a separate project to use it in non-laravel project.

You can also look at example in documentation, I'm pretty there is an example of what you're looking for: https://mailjet.github.io/laravel-mailjet/usage/

And in the developer guide: https://dev.mailjet.com/guides/#personalisation-v3

from laravel-mailjet.

kahunafr avatar kahunafr commented on July 26, 2024

Thanks for your answer, but with https://github.com/mailjet/laravel-mailjet it's impossible to send personnals variable into template?

from laravel-mailjet.

Nightbr avatar Nightbr commented on July 26, 2024

Yep sure you can do all the API can do

from laravel-mailjet.

kahunafr avatar kahunafr commented on July 26, 2024

Like that:
$body = ['Messages' => [ [ 'FromEmail' => "[email protected]", 'Recipients' => [ [ "Email" => "[email protected]" ] ], 'TemplateLanguage' => true, 'MJ-TemplateID' => $ID, 'Subject' => "TEST", 'Variables' => json_decode('{ "link": $url }', true), ] ]]; $response = $mj->post(Resources::$Email, ['body' => $body]);
For a {{var:link}} into template ?

from laravel-mailjet.

Nightbr avatar Nightbr commented on July 26, 2024

Try to set up a project and test by yourself, this should work.

I'm sorry but I have no time to look further right now.

from laravel-mailjet.

kahunafr avatar kahunafr commented on July 26, 2024

It does not work, that's my problem.

from laravel-mailjet.

kahunafr avatar kahunafr commented on July 26, 2024

Here my code : https://codepaste.net/e4aann
This code send the mail, but doesn't transmit the variable. On the mail, i see {{var:link}} and not http://www.google.fr
I do not know if it's clear enough, do you need more information?

from laravel-mailjet.

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.