{"id":16296754,"url":"https://github.com/pgaultier/yii2-mailjet","last_synced_at":"2025-03-20T04:31:37.061Z","repository":{"id":57062978,"uuid":"104782341","full_name":"pgaultier/yii2-mailjet","owner":"pgaultier","description":"Yii2 Mailjet integration","archived":false,"fork":false,"pushed_at":"2018-09-04T16:10:16.000Z","size":36,"stargazers_count":1,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"devel","last_synced_at":"2024-10-11T20:23:57.846Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgaultier.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-25T17:44:33.000Z","updated_at":"2018-09-04T16:10:17.000Z","dependencies_parsed_at":"2022-08-24T14:00:56.942Z","dependency_job_id":null,"html_url":"https://github.com/pgaultier/yii2-mailjet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-mailjet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-mailjet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-mailjet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-mailjet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgaultier","download_url":"https://codeload.github.com/pgaultier/yii2-mailjet/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221734428,"owners_count":16872096,"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":[],"created_at":"2024-10-10T20:23:53.033Z","updated_at":"2024-10-27T21:18:23.844Z","avatar_url":"https://github.com/pgaultier.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mailjet Yii2 integration\n=========================\n\nThis extension allow the developper to use [Mailjet](https://www.mailjet.com/) as an email transport.\n\n\n[![Latest Stable Version](https://poser.pugx.org/sweelix/yii2-mailjet/v/stable)](https://packagist.org/packages/sweelix/yii2-mailjet)\n[![Build Status](https://api.travis-ci.org/pgaultier/yii2-mailjet.svg?branch=master)](https://travis-ci.org/pgaultier/yii2-mailjet)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/?branch=master)\n[![License](https://poser.pugx.org/sweelix/yii2-mailjet/license)](https://packagist.org/packages/sweelix/yii2-mailjet)\n\n[![Latest Development Version](https://img.shields.io/badge/unstable-devel-yellowgreen.svg)](https://packagist.org/packages/sweelix/yii2-mailjet)\n[![Build Status](https://travis-ci.org/pgaultier/yii2-mailjet.svg?branch=devel)](https://travis-ci.org/pgaultier/yii2-mailjet)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/badges/quality-score.png?b=devel)](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/?branch=devel)\n[![Code Coverage](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/badges/coverage.png?b=devel)](https://scrutinizer-ci.com/g/pgaultier/yii2-mailjet/?branch=devel)\n\nInstallation\n------------\n\nIf you use Packagist for installing packages, then you can update your composer.json like this :\n\n``` json\n{\n    \"require\": {\n        \"sweelix/yii2-mailjet\": \"*\"\n    }\n}\n```\n\nHowto use it\n------------\n\nAdd extension to your configuration\n\n``` php\nreturn [\n    //....\n    'components' =\u003e [\n        'mailer' =\u003e [\n            'class' =\u003e 'sweelix\\mailjet\\Mailer',\n            'token' =\u003e '\u003cyour mailjet token\u003e',\n        ],\n    ],\n];\n```\n\nYou can send email as follow (using mailjet templates)\n\n``` php\nYii::$app-\u003emailer-\u003ecompose('contact/html')\n     -\u003esetFrom('from@domain.com')\n     -\u003esetTo($form-\u003eemail)\n     -\u003esetSubject($form-\u003esubject)\n     -\u003esetTemplateId(12345)\n     -\u003esetTemplateModel([\n         'firstname' =\u003e $form-\u003efirstname,\n         'lastname' =\u003e $form-\u003elastname,\n     -\u003esend();\n\n```\n\nFor further instructions refer to the [related section in the Yii Definitive Guide](http://www.yiiframework.com/doc-2.0/guide-tutorial-mailing.html)\n\n\nRunning the tests\n-----------------\n\nBefore running the tests, you should edit the file tests/_bootstrap.php and change the defines :\n\n``` php\n// ...\ndefine('MAILJET_FROM', '\u003csender\u003e');\ndefine('MAILJET_KEY', '\u003ckey\u003e');\ndefine('MAILJET_SECRET', '\u003csecret\u003e');\ndefine('MAILJET_TO', '\u003ctarget\u003e');\ndefine('MAILJET_TEMPLATE', 218932);\n\ndefine('MAILJET_TEST_SEND', false);\n// ...\n\n```\n\nto match your [Mailjet](https://www.mailjet.com/) configuration.\n\nContributing\n------------\n\nAll code contributions - including those of people having commit access -\nmust go through a pull request and approved by a core developer before being\nmerged. This is to ensure proper review of all the code.\n\nFork the project, create a [feature branch ](http://nvie.com/posts/a-successful-git-branching-model/), and send us a pull request.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaultier%2Fyii2-mailjet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgaultier%2Fyii2-mailjet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaultier%2Fyii2-mailjet/lists"}