{"id":15282387,"url":"https://github.com/weluse/yii2-mailjet","last_synced_at":"2025-04-12T22:55:06.872Z","repository":{"id":54830986,"uuid":"68204071","full_name":"weluse/yii2-mailjet","owner":"weluse","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-26T19:21:56.000Z","size":16,"stargazers_count":8,"open_issues_count":2,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T22:55:01.754Z","etag":null,"topics":["mail-client","mailjet","yii2","yii2-extension"],"latest_commit_sha":null,"homepage":null,"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/weluse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-09-14T12:23:40.000Z","updated_at":"2019-06-22T04:34:08.000Z","dependencies_parsed_at":"2022-08-14T04:10:30.797Z","dependency_job_id":null,"html_url":"https://github.com/weluse/yii2-mailjet","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weluse%2Fyii2-mailjet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weluse%2Fyii2-mailjet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weluse%2Fyii2-mailjet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/weluse%2Fyii2-mailjet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/weluse","download_url":"https://codeload.github.com/weluse/yii2-mailjet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643050,"owners_count":21138353,"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":["mail-client","mailjet","yii2","yii2-extension"],"created_at":"2024-09-30T14:25:32.622Z","updated_at":"2025-04-12T22:55:06.842Z","avatar_url":"https://github.com/weluse.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mailjet Client\n\n## Create Mailjet Account\n\nhttps://goo.gl/YNWTwd\n\n## Install\n\n```\ncomposer require weluse/yii2-mailjet\n```\n\nor add it to your composer.json in the require section\n\n```\n\"weluse/yii2-mailjet\": \"*\",\n```\n\n## Setup\n\nadd/replace this in your config under the components key.\n\n```\n'components' =\u003e [\n  'mailer' =\u003e [\n    'class' =\u003e 'weluse\\mailjet\\Mailer',\n    'apikey' =\u003e 'yourApiKey',\n    'secret' =\u003e 'yourSecret',\n  ],\n],\n```\n\n## Example\n\n```\nYii::$app-\u003emailer-\u003ecompose('signup', ['user' =\u003e $user])\n-\u003esetTo($user-\u003eemail)\n-\u003esetFrom([Yii::$app-\u003eparams['noReplyMailAddress'] =\u003e Yii::$app-\u003ename])\n-\u003esetSubject('Signup success')\n-\u003esend();\n```\n\n## Attachment example\n\n```\n// Mail with attachment from string via Message::attachContent()\nYii::$app-\u003emailer-\u003ecompose('view-name')\n-\u003esetSubject('Mail with attachment from content')\n-\u003eattachContent(\"This is the attachment content\", ['fileName' =\u003e 'attachment.txt', 'contentType' =\u003e 'text/plain'])\n-\u003esetTo('info@example.com')\n-\u003esend();\n\n// Mail with attachment from file via Message::attach()\n$filePath = ... // a file path here;\nYii::$app-\u003emailer-\u003ecompose('view-name')\n-\u003esetSubject('Mail with attachment from content')\n-\u003eattach($filePath)\n-\u003esetTo('info@example.com')\n-\u003esend();\n```\n\n## Setup Event Tracking\n\nWrite the tracking item to the mailer config.\n\n```\n'components' =\u003e [\n  'mailer' =\u003e [\n    'class' =\u003e 'weluse\\mailjet\\Mailer',\n    'apikey' =\u003e 'yourApiKey',\n    'secret' =\u003e 'yourSecret',\n    'tracking' =\u003e [\n      'bounce' =\u003e 'http://yoururl.com/tracking?event=bounce',\n    ],\n  ],\n],\n```\n\nTo activate this url you must run this command at one time.\n\n```\nYii::$app-\u003emailer-\u003eactivateTracking();\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweluse%2Fyii2-mailjet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fweluse%2Fyii2-mailjet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fweluse%2Fyii2-mailjet/lists"}