Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Knp Mailjet Bundle

Knp Mailjet Bundle Laravel Package

knplabs/knp-mailjet-bundle

Symfony bundle that integrates the Mailjet email delivery service, giving you simple configuration and service access for sending transactional emails via Mailjet's API inside your Symfony application.

View on GitHub
Deep Wiki
Context7

Symfony2 bundle for handling Mailjet API

Frequently asked questions about Knp Mailjet Bundle
Is knplabs/knp-mailjet-bundle a Laravel package or a Symfony bundle?
It is a Symfony 2.x bundle, not a Laravel package. It integrates through a Bundle subclass, a DependencyInjection extension with a TreeBuilder config tree, and YAML service definitions. Laravel has no bundle concept; it uses package discovery, service providers, facades and config/*.php merges, so none of the bundle's registration surface transfers. Only the underlying Mailjet API calls and credential semantics are reusable in a Laravel app.
Can I install knplabs/knp-mailjet-bundle in a Laravel 10 or Laravel 11 application?
Most likely not. The package targets a 2016-era Symfony stack, so expect composer.json constraints around php >=5.5 and symfony/symfony ~2.3|~3.0, which conflict with Laravel 10/11's PHP 8.1+ requirement. The 1.1.1 patch notes do not state whether those constraints moved, so run composer why-not before assuming. Even if it installs, it will not auto-register as a Laravel package.
What does knplabs/knp-mailjet-bundle actually provide?
It is a thin dependency-injection wrapper over the official Mailjet PHP SDK. It registers the Mailjet client as a container service, reads public and private API keys, a sandbox flag and an optional HTTP client from YAML, and exposes one or two service aliases. It adds no queueing, retries, logging or Laravel-specific mail transport.
Is knplabs/knp-mailjet-bundle still maintained?
Maintenance is ambiguous. A 1.1.1 tag exists, but its changelog is only a pointer to issue #6, which is equally consistent with a drive-by fix as with a revival. The repository was archived with no substantive release since 2016-07-05. Treat it as unsupported until you diff the tag and confirm a named maintainer.
How do I send Mailjet transactional email in Laravel without this bundle?
Install the official mailjet/mailjet-apiv3-php SDK or the mailjet/laravel-mailjet package, then bind a single client instance in a service provider. Read credentials from config/services.php backed by environment variables and inject the client into jobs or mailers. This keeps you on a maintained SDK and avoids the Symfony wiring layer entirely.
How do I configure Mailjet API key and secret in Laravel instead of YAML?
Add MAILJET_APIKEY and MAILJET_SECRET entries to .env, reference them from config/services.php, and resolve them through config() so config:cache works in production. Never commit real keys or call env() directly outside config files. The Symfony bundle's YAML keys map cleanly onto this, but the loading mechanism is completely different.
Can I mock or fake Mailjet API calls in Laravel tests?
Yes, but not through this bundle. With a Laravel service provider you can bind an interface to a fake implementation or swap the client for a mock in the container during tests. Use Mailjet's sandbox mode or HTTP fakes for integration tests, and assert that your mailable or job was dispatched rather than hitting the live API. The bundle offers no testing hooks of its own.
How much work is it to port this Symfony bundle to a Laravel service provider?
Roughly a day. The bundle is only a few hundred lines: a config tree, service definitions and aliases. In Laravel you would replace that with a service provider, a config/services.php entry and a singleton binding, then call the SDK directly. Forking and maintaining a Symfony bundle inside a Laravel app is not worth the effort.
What Mailjet features does the bundle expose, such as templates, contacts and webhooks?
In theory the full SDK is available for transactional sends, templates, contacts and lists, campaigns and stats, because the bundle only exposes the client. In practice the wrapper covers client construction and little else, and Mailjet has retired endpoints such as the SMS API since the bundle's last substantive release. Webhooks, bounce handling and retries are not provided and would be your responsibility.
What are the best alternatives to knplabs/knp-mailjet-bundle for Laravel?
Use mailjet/laravel-mailjet if you want a Laravel-native integration, or mailjet/mailjet-apiv3-php if you prefer to bind the official SDK yourself. For simple transactional mail, Laravel's built-in Mail facade with an SMTP or API transport may be sufficient. Avoid adopting the Symfony bundle unless you are maintaining a legacy Symfony 2.x application.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment
uni-method/symfony-lib