Back to main menu

Product

Mailjet’s new JAVA and PHP clients make integration easy for all

Our new JAVA and PHP API client update allows developers to fetch data directly from the API with a lighter internal code-style.

Gods putting cubes together

PUBLISHED ON

PUBLISHED ON

We’re so excited to share that we recently launched a new version of our JAVA and PHP API clients. This new update allows developers to fetch data directly from the API with a lighter internal code-style. We wanted all users - experts and beginners to be able to easily pick up the wrapper internals and contribute or change the code to fit their needs.

We’ve also integrated Travis in both wrappers for unit tests, It’s an automated test runner for our git repositories, so you can confidently make pull requests without breaking the existing implementation, stay up-to-date with wrapper states and also make sure you are working with a stable version of the API Client.

Why we decided to iterate on our first version

Our original Java wrapper was a little complex for beginners to pick up. For example, getting a Campaign resource in Java was pretty lengthy. Now, we’ve scaled this process down to only two lines of code, making it more accessible for all.

Leveraging the Open Source community was also one of our goals. of this new update. We used the Google Http Client Library via a Java community project, and the well known Guzzle Http library for PHP. This will ensure our API client will be available on Google Cloud services, is maintained by the community, and focuses on simplicity.

We love our developer community and encourage you guys to contribute as much as you want! We already go a lot of interest from the Github community and some amazing contributions on both wrappers, and we will be happy to review your work!

We also wanted to give beginners, students and Hackathon attendees a way to quickly send email without having to worry about anything else than their application rather than the email itself:

In Java, sending an email can be performed through the MJEasyClient class. In PHP, it's almost the same

What does this all mean?

On the internals, both PHP and Java now have a much simpler, more consistent code that'll make it easier for you, our community to contribute and work together in. With this new update, our wrappers are now designed with the most popular guidelines in the industry. For example, we used namespaces, autoload and PSR style guide for PHP. It also means you'll be able to get the clients and their dependencies with popular dependency managers such as Composer in PHP and Maven in Java. We can't wait to see what you build with the updated clients!

To learn more about the new PHP and Java clients, hop over to our Github pages here and here.

Popular posts

Hermes rides a firework next to a Goddess in front of a night sky with more fireworks

Top email marketing trends for 2022

To the outsiders, it can sometimes feel like email hasn't changed that much since it was created. Maybe this is why some are so persistent in...

Read more

Hermes on a moped delivering mail to a mailbox

Reducing email’s carbon footprint

When it comes to protecting our planet, every step toward cleaner practices – small and big – counts. So, what if we told you that emailing, as clean and green as it seems...

Read more

Mother's day gift for Hera

Marketing calendar 2024: Dates you shouldn’t miss this year

We finally got through 2023 (phew!) and Q1 is just around the corner. It’s time for you to start scribbling down your New Year’s Resolutions to make sure we start the year with a bang. If you’ve found your way here, we’re guessing that’s because creating a winning...

Read more

It's never been easier to build connected experiences. Start sending with Mailjet today.Get started on your path
CTA icon