{"id":16296755,"url":"https://github.com/pgaultier/yii2-sendgrid","last_synced_at":"2025-08-16T08:05:34.355Z","repository":{"id":57062989,"uuid":"58277012","full_name":"pgaultier/yii2-sendgrid","owner":"pgaultier","description":"Yii2 Sendgrid integration","archived":false,"fork":false,"pushed_at":"2018-03-21T17:29:10.000Z","size":53,"stargazers_count":2,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"devel","last_synced_at":"2025-03-17T14:49:13.348Z","etag":null,"topics":["mailer","sendgrid","yii2"],"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":"2016-05-07T17:31:14.000Z","updated_at":"2020-12-09T16:37:08.000Z","dependencies_parsed_at":"2022-08-24T10:10:15.762Z","dependency_job_id":null,"html_url":"https://github.com/pgaultier/yii2-sendgrid","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-sendgrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-sendgrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-sendgrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgaultier%2Fyii2-sendgrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgaultier","download_url":"https://codeload.github.com/pgaultier/yii2-sendgrid/tar.gz/refs/heads/devel","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244552538,"owners_count":20471115,"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":["mailer","sendgrid","yii2"],"created_at":"2024-10-10T20:23:53.131Z","updated_at":"2025-03-20T04:31:31.917Z","avatar_url":"https://github.com/pgaultier.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sendgrid Yii2 integration\n=========================\n\nThis extension allow the developper to use [Sendgrid](https://sendgrid.com/) as an email transport.\n\n\n[![Latest Stable Version](https://poser.pugx.org/sweelix/yii2-sendgrid/v/stable)](https://packagist.org/packages/sweelix/yii2-sendgrid)\n[![Build Status](https://api.travis-ci.org/pgaultier/yii2-sendgrid.svg?branch=master)](https://travis-ci.org/pgaultier/yii2-sendgrid)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/?branch=master)\n[![Code Coverage](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/?branch=master)\n[![License](https://poser.pugx.org/sweelix/yii2-sendgrid/license)](https://packagist.org/packages/sweelix/yii2-sendgrid)\n\n[![Latest Development Version](https://img.shields.io/badge/unstable-devel-yellowgreen.svg)](https://packagist.org/packages/sweelix/yii2-sendgrid)\n[![Build Status](https://travis-ci.org/pgaultier/yii2-sendgrid.svg?branch=devel)](https://travis-ci.org/pgaultier/yii2-sendgrid)\n[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/badges/quality-score.png?b=devel)](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/?branch=devel)\n[![Code Coverage](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/badges/coverage.png?b=devel)](https://scrutinizer-ci.com/g/pgaultier/yii2-sendgrid/?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-sendgrid\": \"*\"\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\\sendgrid\\Mailer',\n            'token' =\u003e '\u003cyour sendgrid token\u003e',\n        ],\n    ],\n];\n```\n\nYou can send email as follow (using postmark 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('SENDGRID_FROM', '\u003csender\u003e');\ndefine('SENDGRID_TOKEN', '\u003ctoken\u003e');\ndefine('SENDGRID_TO', '\u003ctarget\u003e');\ndefine('SENDGRID_TEMPLATE', 575741);\n\ndefine('SENDGRID_TEST_SEND', false);\n// ...\n\n```\n\nto match your [Sendgrid](https://sendgrid.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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaultier%2Fyii2-sendgrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgaultier%2Fyii2-sendgrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgaultier%2Fyii2-sendgrid/lists"}