{"id":14983654,"url":"https://github.com/expertcoder/swiftmailersendgridbundle","last_synced_at":"2025-04-10T19:04:31.600Z","repository":{"id":56980602,"uuid":"74680013","full_name":"expertcoder/SwiftmailerSendGridBundle","owner":"expertcoder","description":"Symfony bundle for SendGrid. Utilizes the SendGrid PHP Library https://github.com/sendgrid/sendgrid-php to make it compatible with SwiftMailer","archived":false,"fork":false,"pushed_at":"2019-11-28T14:12:53.000Z","size":41,"stargazers_count":14,"open_issues_count":1,"forks_count":15,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T19:51:27.025Z","etag":null,"topics":["php","sendgrid","swiftmailer","symfony-bundle","symfony2","symfony3","symfony4"],"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/expertcoder.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-11-24T14:24:02.000Z","updated_at":"2022-04-08T04:59:37.000Z","dependencies_parsed_at":"2022-08-21T10:50:31.211Z","dependency_job_id":null,"html_url":"https://github.com/expertcoder/SwiftmailerSendGridBundle","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expertcoder%2FSwiftmailerSendGridBundle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expertcoder%2FSwiftmailerSendGridBundle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expertcoder%2FSwiftmailerSendGridBundle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/expertcoder%2FSwiftmailerSendGridBundle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/expertcoder","download_url":"https://codeload.github.com/expertcoder/SwiftmailerSendGridBundle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248279196,"owners_count":21077406,"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":["php","sendgrid","swiftmailer","symfony-bundle","symfony2","symfony3","symfony4"],"created_at":"2024-09-24T14:07:44.205Z","updated_at":"2025-04-10T19:04:31.579Z","avatar_url":"https://github.com/expertcoder.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Freelance Banner](https://s3.eu-central-1.amazonaws.com/static.expertcoder.io/github-banner/banner.png)\n\n# SwiftmailerSendGridBundle\n\n[![Latest Version](https://img.shields.io/github/release/expertcoder/SwiftmailerSendGridBundle.svg?style=flat-square)](https://github.com/expertcoder/SwiftmailerSendGridBundle/releases)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)\n[![Build Status](https://img.shields.io/travis/expertcoder/SwiftmailerSendGridBundle.svg?style=flat-square)](https://travis-ci.org/expertcoder/SwiftmailerSendGridBundle)\n\nSymfony bundle for SendGrid. Utilizes the SendGrid PHP Library https://github.com/sendgrid/sendgrid-php \nto make it compatiable with SwiftMailer.\n\n**Older version (1.x) can be found here:** https://github.com/expertcoder/SwiftmailerSendGridBundle/tree/1.x\n\n## Installation\n\n`composer require expertcoder/swiftmailer-send-grid-bundle`\n\n**or manually**\n\n*composer.json*\n```json\n\"require\": {\n    ...\n    \"expertcoder/swiftmailer-send-grid-bundle\": \"~2.0\"\n}\n\n```\n\n*config/packages/swiftmailer.yaml*\n```yml\nswiftmailer:\n    transport: expertcoder_swift_mailer.send_grid\n```\n\nDon't forget to set your Sendgrid API Key in your *.env* file, and that you can set your mail's categories from `config/packages/expert_coder_swiftmailer_send_grid.yaml`\n\nApplications that don't use Symfony Flex\n----------------------------------------\n\n*AppKernel.php*\n```php\n$bundles = [\n    // ...\n    new ExpertCoder\\Swiftmailer\\SendGridBundle\\ExpertCoderSwiftmailerSendGridBundle(),\n];\n```\n\n*parameters.yml.dist*\n```yml\nparameters:\n    sendgrid_api_key: PleaseEnterSendGridApiKey\n```\n\n*config.yml*\n```yml\nswiftmailer:\n    transport: expertcoder_swift_mailer.send_grid\n    \nexpert_coder_swiftmailer_send_grid:\n    api_key: %sendgrid_api_key%\n    categories: [my_category] # optional, will be added to all mails sent (can be seen on sendgrid dashboard)\n```\nSymfony 3\n---------\n\nSince Symfony 3.2, you must name the custom transport service swiftmailer.mailer.transport.\u003c name \u003e so you can use one of the solutions below:\n\n*services.yml*\n```yml\nservices:\n    swiftmailer.mailer.transport.expertcoder_swift_mailer.send_grid.transport:\n      alias: expertcoder_swift_mailer.send_grid.transport\n```\n**OR**\n\n*config.yml*\n```yml\nswiftmailer:\n    transport: 'swiftmailer.mailer.transport.expertcoder_swift_mailer.send_grid'\n```\n\n## Tests\n\nThis bundle provide a little helper to launch tests locally and here is a quick explanation:\n\n* The `config_test.yml` file contains configuration associated with the bundle.\n* The `manual-test.sh` helps you test against a specific symfony version and is the main helper to execute tests. You just have to do `sh tests/manual-test.sh versionNumber` where versionNumber is the main Symfony version you want to test (ex: 4)\n* The last file contains PhpUnit tests with help of `nyholm/symfony-bundle-test`. Note that we set a timeout of 1sec when sending mail to sendgrid as we do not test the actual sendgrid API with a real key.\n\n## Important !\n\nFollowing RFC 1341, section 7.2, if either `text/html` or `text/plain` are to be sent in your email: `text/plain` needs to be first, followed by `text/html`, followed by any other content.\n\n\nFor more informations, please see [SwiftMailer](https://swiftmailer.symfony.com/docs/messages.html#quick-reference) and [RFC 1341](https://www.w3.org/Protocols/rfc1341/7_2_Multipart.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpertcoder%2Fswiftmailersendgridbundle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpertcoder%2Fswiftmailersendgridbundle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpertcoder%2Fswiftmailersendgridbundle/lists"}