- How do I install mailjet/laravel-mailjet in a Laravel application?
- Install the package with Composer using composer require mailjet/laravel-mailjet. Then add a Mailjet mailer entry in config/mail.php and set the matching environment credentials such as MAILJET_APIKEY and MAILJET_SECRET. After that, point Laravel's default mailer or a specific mailer at the Mailjet transport and verify sending in a non-production environment.
- Which Laravel and PHP versions does mailjet/laravel-mailjet 3.2.0 support?
- Release 3.2.0 adds Laravel 13 support and widens the Composer constraints, which improves forward compatibility. The exact Laravel and PHP ranges should be confirmed in the package's composer.json and CI matrix before upgrading. Also check whether Laravel 10, 11, and 12 remain covered, since the release notes do not explicitly list dropped versions.
- How do I configure Mailjet as the mail transport in Laravel's config/mail.php?
- Add a mailer entry under the mailers array in config/mail.php using the Mailjet transport driver and reference the required API credentials. Then set Laravel's default mailer, or select the Mailjet mailer explicitly when sending mail. Keep the configuration aligned with the environment variables used for MAILJET_APIKEY and MAILJET_SECRET.
- What environment variables does laravel-mailjet require?
- The package typically requires Mailjet API credentials, commonly MAILJET_APIKEY and MAILJET_SECRET, along with the usual Laravel mail settings such as MAIL_MAILER. Store these values in your .env file and mirror them in staging and production secret management. Confirm the exact key names against the package configuration before deploying.
- Does mailjet/laravel-mailjet support Laravel 13?
- Yes, release 3.2.0 adds Laravel 13 support and widens Composer constraints. You should still validate that your PHP version and the underlying mailjet/apiv2 client version resolve cleanly in your lockfile. Run the application's test suite and a sandbox send before relying on it in production.
- Can I use laravel-mailjet to manage Mailjet contacts, lists, campaigns, and templates, not just send email?
- Yes, the package is described as a wrapper for Mailjet API V3 as well as a Laravel mail transport. That means it can expose Mailjet API operations such as contacts, lists, campaigns, templates, and stats through a Laravel-style facade. For complex API workflows, check the available methods and fall back to the direct Mailjet SDK if needed.
- Is upgrading from mailjet/laravel-mailjet 3.1.x to 3.2.0 safe, or are there breaking changes?
- The 3.2.0 release notes do not call out breaking changes, so it appears to be a low-risk minor upgrade. However, the widened Composer constraints can cause dependency resolution to select newer transitive packages. Upgrade in a development branch, review the diff, run tests, and confirm mail sending with Mailjet test credentials before deploying.
- How can I test Mailjet email sending in Laravel without sending real messages?
- Use Laravel's mail testing tools, such as Mail::fake(), to assert that mailables are sent without hitting the Mailjet API. For transport-level validation, use Mailjet sandbox or test credentials and target a staging environment. Also exercise queued and synchronous mail paths, since production failures often appear in only one of those flows.
- What are the alternatives to mailjet/laravel-mailjet for sending Mailjet email from Laravel?
- Alternatives include using Mailjet's SMTP relay through Laravel's SMTP transport or calling the official Mailjet API client directly. A direct SDK can be simpler for non-Laravel services or highly custom API workflows. The Laravel package is most useful when you want a native mail transport and Laravel-style configuration and facades.
- How does mailjet/laravel-mailjet handle Mailjet API rate limits and failures in production?
- The package itself is mainly bounded by Mailjet account limits, API rate limits, and sending reputation. For high-volume applications, send through Laravel queues and monitor Mailjet API throttling, timeouts, and error responses. Plan retries or backoff where appropriate and keep a fallback path to SMTP or direct API integration for critical mail.