{"id":14974521,"url":"https://github.com/mailjet/laravel-mailjet","last_synced_at":"2025-04-10T06:18:28.999Z","repository":{"id":22160765,"uuid":"95460752","full_name":"mailjet/laravel-mailjet","owner":"mailjet","description":"Laravel package for Mailjet API V3 and Laravel Mailjet Mail Transport","archived":false,"fork":false,"pushed_at":"2025-02-25T21:01:59.000Z","size":2926,"stargazers_count":100,"open_issues_count":3,"forks_count":94,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-03T03:57:11.337Z","etag":null,"topics":["email","laravel","laravel54","mailjet","mailjet-api","packagist","php","transactional-emails"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mailjet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-06-26T15:22:29.000Z","updated_at":"2025-02-25T10:38:53.000Z","dependencies_parsed_at":"2024-06-18T13:54:12.021Z","dependency_job_id":"2a518f42-93f1-4895-b211-fcffd7877ab1","html_url":"https://github.com/mailjet/laravel-mailjet","commit_stats":{"total_commits":78,"total_committers":16,"mean_commits":4.875,"dds":0.782051282051282,"last_synced_commit":"4eeb55a27928a580ba9efee2571a95b582604db7"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailjet%2Flaravel-mailjet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailjet%2Flaravel-mailjet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailjet%2Flaravel-mailjet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mailjet%2Flaravel-mailjet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mailjet","download_url":"https://codeload.github.com/mailjet/laravel-mailjet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166863,"owners_count":21058481,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["email","laravel","laravel54","mailjet","mailjet-api","packagist","php","transactional-emails"],"created_at":"2024-09-24T13:50:41.132Z","updated_at":"2025-04-10T06:18:28.966Z","avatar_url":"https://github.com/mailjet.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Mailjet\n\n[![Build Status](https://travis-ci.org/mailjet/laravel-mailjet.svg?branch=master)](https://travis-ci.org/mailjet/laravel-mailjet)\n[![Packagist](https://img.shields.io/packagist/v/mailjet/laravel-mailjet.svg)](https://packagist.org/packages/mailjet/laravel-mailjet)\n[![Packagist](https://img.shields.io/packagist/dt/mailjet/laravel-mailjet.svg)](https://packagist.org/packages/mailjet/laravel-mailjet)\n[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/mailjet/laravel-mailjet/blob/master/LICENSE.md)\n[![Documentation](https://img.shields.io/badge/documentation-gh--pages-blue.svg)](https://mailjet.github.io/laravel-mailjet/)\n\nLaravel package for handling Mailjet API v3 using this wrapper: \u003chttps://github.com/mailjet/mailjet-apiv3-php\u003e\n\nIt also provides a mailjetTransport for [Laravel mail feature](https://laravel.com/docs/master/mail)\n\n## Installation\n\nFirst, include the package in your dependencies:\n\n    composer require mailjet/laravel-mailjet\n\nThen, you need to add some informations in your configuration files. You can find your Mailjet API key/secret [here](https://app.mailjet.com/account/api_keys).\nPlease also set your email from address and name.\n\n* In the providers array:\n\n```php\n'providers' =\u003e [\n    ...\n    Mailjet\\LaravelMailjet\\MailjetServiceProvider::class,\n    ...\n]\n```\n\n## Laravel 11.0+\nIn the file  `example-app/bootstrap/providers.php`\n```php\nuse Mailjet\\LaravelMailjet\\MailjetServiceProvider;\n\nreturn [\n    App\\Providers\\AppServiceProvider::class,\n    MailjetServiceProvider::class,\n];\n````\n\n* In the aliases array:\n\n```php\n'aliases' =\u003e [\n    ...\n    'Mailjet' =\u003e Mailjet\\LaravelMailjet\\Facades\\Mailjet::class,\n    ...\n]\n```\n\n* In the services.php file:\n\n```php\n'mailjet' =\u003e [\n    'key' =\u003e env('MAILJET_APIKEY'),\n    'secret' =\u003e env('MAILJET_APISECRET'),\n]\n```\n\n* In your .env file:\n\n```php\nMAILJET_APIKEY=YOUR_APIKEY\nMAILJET_APISECRET=YOUR_APISECRET\nMAIL_FROM_ADDRESS=YOUR_EMAIL_FROM_ADDRESS\nMAIL_FROM_NAME=YOU_FROM_NAME\n```\n\n## Full configuration\n\nFor details head to [configuration doc](docs/configuration.md).\n\n## Mail driver configuration\n\nIn order to use Mailjet as your Mail driver, you need to update the mail driver in your `config/mail.php` or your `.env` file to `MAIL_MAILER=mailjet` (for Laravel 6 and older use MAIL_DRIVER constant instead), and make sure you are using a valid and authorised from email address configured on your Mailjet account. The sending email addresses and domain can be managed [here](https://app.mailjet.com/account/sender)\n\nFor Laravel 7+ you also need to specify new available mail driver in config/mail.php:\n```\n'mailers' =\u003e [\n    ...\n\n    'mailjet' =\u003e [\n        'transport' =\u003e 'mailjet',\n    ],\n],\n```\nFor usage, please check the [Laravel mail documentation](https://laravel.com/docs/master/mail)\n\n## Usage\n\nIn order to usage this package, you first need to import Mailjet Facade in your code:\n\n    use Mailjet\\LaravelMailjet\\Facades\\Mailjet;\n\n\nThen, in your code you can use one of the methods available in the MailjetServices.\n\nLow level API methods:\n\n* `Mailjet::get($resource, $args, $options)`\n* `Mailjet::post($resource, $args, $options)`\n* `Mailjet::put($resource, $args, $options)`\n* `Mailjet::delete($resource, $args, $options)`\n\nHigh level API methods:\n\n* `Mailjet::getAllLists($filters)`\n* `Mailjet::createList($body)`\n* `Mailjet::getListRecipients($filters)`\n* `Mailjet::getSingleContact($id)`\n* `Mailjet::createContact($body)`\n* `Mailjet::createListRecipient($body)`\n* `Mailjet::editListrecipient($id, $body)`\n\nFor more informations about the filters you can use in each methods, refer to the [Mailjet API documentation](https://dev.mailjet.com/email-api/v3/apikey/)\n\nAll method return `Mailjet\\Response` or throw a `MailjetException` in case of API error.\n\nYou can also get the Mailjet API client with the method `getClient()` and make your own custom request to Mailjet API.\n\nIf you need to delete a contact, you need to register ContactsServiceProvider:\n* In the providers array:\n\n```php\n'providers' =\u003e [\n    ...\n    \\Mailjet\\LaravelMailjet\\Providers\\ContactsServiceProvider::class,\n    ...\n]\n```\n\nand use it:\n```php\npublic function handle(ContactsV4Service $contactsV4Service)\n{\n    $response = $contactsV4Service-\u003edelete(351406781);\n    ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailjet%2Flaravel-mailjet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmailjet%2Flaravel-mailjet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmailjet%2Flaravel-mailjet/lists"}