{"id":20757174,"url":"https://github.com/vapor-community/sendgrid","last_synced_at":"2025-04-05T14:05:06.569Z","repository":{"id":43323055,"uuid":"80089108","full_name":"vapor-community/sendgrid","owner":"vapor-community","description":"📧 SendGrid-powered mail backend for Vapor","archived":false,"fork":false,"pushed_at":"2025-02-01T15:58:39.000Z","size":111,"stargazers_count":77,"open_issues_count":2,"forks_count":31,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-29T13:06:17.975Z","etag":null,"topics":["email","sendgrid","server-side-swift","swift","swift-linux","swift-package","swift-package-manager","vapor","vapor-provider","vapor-service"],"latest_commit_sha":null,"homepage":"https://swiftpackageindex.com/vapor-community/sendgrid","language":"Swift","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/vapor-community.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-26T05:38:01.000Z","updated_at":"2025-02-01T15:53:56.000Z","dependencies_parsed_at":"2025-02-10T16:56:32.390Z","dependency_job_id":null,"html_url":"https://github.com/vapor-community/sendgrid","commit_stats":{"total_commits":53,"total_committers":11,"mean_commits":4.818181818181818,"dds":0.7547169811320755,"last_synced_commit":"148eeafd6c2debb8f75a1df4420a07ff6faa2209"},"previous_names":["vapor-community/sendgrid-provider"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fsendgrid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fsendgrid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fsendgrid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vapor-community%2Fsendgrid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vapor-community","download_url":"https://codeload.github.com/vapor-community/sendgrid/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247345850,"owners_count":20924102,"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","sendgrid","server-side-swift","swift","swift-linux","swift-package","swift-package-manager","vapor","vapor-provider","vapor-service"],"created_at":"2024-11-17T09:40:09.212Z","updated_at":"2025-04-05T14:05:06.549Z","avatar_url":"https://github.com/vapor-community.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://avatars.githubusercontent.com/u/26165732?s=200\u0026v=4\" width=\"100\" height=\"100\" alt=\"avatar\" /\u003e\n    \u003ch1\u003eSendGrid\u003c/h1\u003e\n    \u003ca href=\"https://swiftpackageindex.com/vapor-community/sendgrid/documentation\"\u003e\n        \u003cimg src=\"https://design.vapor.codes/images/readthedocs.svg\" alt=\"Documentation\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://discord.gg/vapor\"\u003e\u003cimg src=\"https://design.vapor.codes/images/discordchat.svg\" alt=\"Team Chat\"\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://design.vapor.codes/images/mitlicense.svg\" alt=\"MIT License\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/vapor-community/sendgrid/actions/workflows/test.yml\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/actions/workflow/status/vapor-community/sendgrid/test.yml?event=push\u0026style=plastic\u0026logo=github\u0026label=tests\u0026logoColor=%23ccc\" alt=\"Continuous Integration\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://codecov.io/github/vapor-community/sendgrid\"\u003e\n        \u003cimg src=\"https://img.shields.io/codecov/c/github/vapor-community/sendgrid?style=plastic\u0026logo=codecov\u0026label=codecov\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://swift.org\"\u003e\n        \u003cimg src=\"https://design.vapor.codes/images/swift60up.svg\" alt=\"Swift 6.0+\"\u003e\n    \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n📧 SendGrid library for the Vapor web framework, based on [SendGridKit](https://github.com/vapor-community/sendgrid-kit).\n\nSend simple emails or leverage the full capabilities of [SendGrid's V3 API](https://www.twilio.com/docs/sendgrid/api-reference/mail-send/mail-send).\n\n### Getting Started\n\nUse the SPM string to easily include the dependendency in your `Package.swift` file\n\n```swift\n.package(url: \"https://github.com/vapor-community/sendgrid.git\", from: \"6.0.0\"),\n```\n\nand add it to your target's dependencies:\n\n```swift\n.product(name: \"SendGrid\", package: \"sendgrid\"),\n```\n\n## Overview\n\n\u003e [!WARNING]\n\u003e Make sure that the `SENDGRID_API_KEY` variable is set in your environment.\nThis can be set in the Xcode scheme, or specified in your `docker-compose.yml`, or even provided as part of a `swift run` command.\nA missing API key will result in a fatal error.\n\n### Using the API\n\nYou can use all of the available parameters here to build your `SendGridEmail`.\n\nUsage in a route closure would be as followed:\n\n```swift\nimport SendGrid\n\nlet email = SendGridEmail(…)\ntry await req.sendgrid.client.send(email: email)\n```\n\n### Error handling\n\nIf the request to the API failed for any reason a `SendGridError` is thrown, which has an `errors` property that contains an array of errors returned by the API.\n\nSimply ensure you catch errors thrown like any other throwing function.\n\n```swift\nimport SendGrid\n\ndo {\n    try await req.sendgrid.client.send(email: email)\n} catch let error as SendGridError {\n    req.logger.error(\"\\(error.errors)\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fsendgrid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvapor-community%2Fsendgrid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvapor-community%2Fsendgrid/lists"}