{"id":37158289,"url":"https://github.com/deckarep/sendgrid-go","last_synced_at":"2026-01-14T18:53:49.668Z","repository":{"id":17557496,"uuid":"20360439","full_name":"deckarep/sendgrid-go","owner":"deckarep","description":"SendGrid Library to Interface through GO","archived":false,"fork":true,"pushed_at":"2014-05-31T16:58:21.000Z","size":176,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T01:50:47.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sendgrid/sendgrid-go","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deckarep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-31T16:55:23.000Z","updated_at":"2014-06-01T01:33:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deckarep/sendgrid-go","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/deckarep/sendgrid-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fsendgrid-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fsendgrid-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fsendgrid-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fsendgrid-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deckarep","download_url":"https://codeload.github.com/deckarep/sendgrid-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deckarep%2Fsendgrid-go/sbom","scorecard":{"id":331477,"data":{"date":"2025-08-11","repo":{"name":"github.com/deckarep/sendgrid-go","commit":"75c90498c9b6f3270eb74f611b309d99ff763f6c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"checks":[{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T03:45:34.995Z","repository_id":17557496,"created_at":"2025-08-18T03:45:34.995Z","updated_at":"2025-08-18T03:45:34.995Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28430961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":"2026-01-14T18:53:48.894Z","updated_at":"2026-01-14T18:53:49.663Z","avatar_url":"https://github.com/deckarep.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SendGrid-Go\n[![Build Status](https://travis-ci.org/sendgrid/sendgrid-go.svg?branch=master)](https://travis-ci.org/sendgrid/sendgrid-go)\nSendGrid Helper Library to send emails very easily using Go.\n\n## Installation\n\n```bash\ngo get github.com/sendgrid/sendgrid-go\n```\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/sendgrid/sendgrid-go\"\n)\n\nfunc main() {\n\tsg := sendgrid.NewSendGridClient(\"sendgrid_user\", \"sendgrid_key\")\n\tmessage := sendgrid.NewMail()\n\tmessage.AddTo(\"yamil@sendgrid.com\")\n\tmessage.AddToName(\"Yamil Asusta\")\n\tmessage.SetSubject(\"SendGrid Testing\")\n\tmessage.SetText(\"WIN\")\n\tmessage.SetFrom(\"yamil@sendgrid.com\")\n    if r := sg.Send(message); r == nil {\n\t\tfmt.Println(\"Email sent!\")\n\t} else {\n\t\tfmt.Println(r)\n\t}\n}\n\n```\n\n### Creating a Client\n\n```go\nsg := sendgrid.NewSendGridClient(\"sendgrid_user\", \"sendgrid_key\")\n```\n\n### Creating a Mail\n```go\nmessage := sendgrid.NewMail()\n```\n\n### Adding Recipients\n\n```go\nmessage.AddTo(\"example@sendgrid.com\") // Returns error if email string is not valid RFC 5322\n// or\naddress, _ := mail.ParseAddress(\"Example \u003cexample@sendgrid.com\u003e\")\nmessage.AddRecipient(address) // Receives a vaild mail.Address\n```\n\n### Adding BCC Recipients\n\nSame concept as regular recipient excepts the methods are:\n\n*   AddBCC\n*   AddRecipientBCC\n\n### Setting the Subject\n\n```go\nmessage.SetSubject(\"New email\")\n```\n\n### Set Text or HTML\n\n```go\nmessage.SetText(\"Add Text Here..\")\n//or\nmessage.SetHTML(\"\u003chtml\u003e\u003cbody\u003eStuff, you know?\u003c/body\u003e\u003c/html\u003e\")\n```\n### Set From\n\n```go\nmessage.SetFrom(\"example@lol.com\")\n```\n### Set File Attachments\n\n```go\nmessage.AddAttachment(\"text.txt\", file) // file needs to implement the io.Reader interface\n//or\nmessage.AddAttachmentStream(\"filename\", []byte(\"some file content\"))\n```\n### Adding ContentIDs\n\n```go\nmessage.AddContentID(\"id\", \"content\")\n```\n\n## SendGrid's  [X-SMTPAPI](http://sendgrid.com/docs/API_Reference/SMTP_API/)\n\nIf you wish to use the X-SMTPAPI on your own app, you can use the [SMTPAPI Go library](https://github.com/sendgrid/smtpapi-go).\n\n\n### Recipients\n\n```go\nmessage.AddTo(\"addTo@mailinator.com\")\n// or\ntos := []string{\"test@test.com\", \"test@email.com\"}\nmessage.AddTos(tos)\n// or\nmessage.SetTos(tos)\n```\n\n### [Substitutions](http://sendgrid.com/docs/API_Reference/SMTP_API/substitution_tags.html)\n\n```go\nmessage.AddSubstitution(\"key\", \"value\")\n// or\nvalues := []string{\"value1\", \"value2\"}\nmessage.AddSubstitutions(\"key\", values)\n//or\nsub := make(map[string][]string)\nsub[\"key\"] = values\nmessage.SetSubstitutions(sub)\n```\n\n### [Section](http://sendgrid.com/docs/API_Reference/SMTP_API/section_tags.html)\n\n```go\nmessage.AddSection(\"section\", \"value\")\n// or\nsections := make(map[string]string)\nsections[\"section\"] = \"value\"\nmessage.SetSections(sections)\n```\n\n### [Category](http://sendgrid.com/docs/Delivery_Metrics/categories.html)\n\n```go\nmessage.AddCategory(\"category\")\n// or\ncategories := []string{\"setCategories\"}\nmessage.AddCategories(categories)\n// or\nmessage.SetCategories(categories)\n```\n\n### [Unique Arguments](http://sendgrid.com/docs/API_Reference/SMTP_API/unique_arguments.html)\n\n```go\nmessage.AddUniqueArg(\"key\", \"value\")\n// or\nargs := make(map[string]string)\nargs[\"key\"] = \"value\"\nmessage.SetUniqueArgs(args)\n```\n\n### [Filters](http://sendgrid.com/docs/API_Reference/SMTP_API/apps.html)\n\n```go\nmessage.AddFilter(\"filter\", \"setting\", \"value\")\n// or\nfilter := \u0026Filter{\n  Settings: make(map[string]string),\n}\nfilter.Settings[\"enable\"] = \"1\"\nfilter.Settings[\"text/plain\"] = \"You can haz footers!\"\nmessage.SetFilter(\"footer\", filter)\n```\n\n### JSONString\n\n```go\nmessage.JSONString() //returns a JSON string representation of the headers\n```\n\n## AppEngine Example\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"appengine/urlfetch\"\n\t\"github.com/sendgrid/sendgrid-go\"\n)\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n\tsg := sendgrid.NewSendGridClient(\"sendgrid_user\", \"sendgrid_key\")\n\tc := appengine.NewContext(r)\n\t// set http.Client to use the appengine client\n\tsg.Client = urlfetch.Client(c) //Just perform this swap, and you are good to go.\n\tmessage := sendgrid.NewMail()\n\tmessage.AddTo(\"yamil@sendgrid.com\")\n\tmessage.SetSubject(\"SendGrid is Baller\")\n\tmessage.SetHTML(\"Simple Text\")\n\tmessage.SetFrom(\"kunal@sendgrid.com\")\n\tif r := sg.Send(message); r == nil {\n\t\tfmt.Println(\"Email sent!\")\n\t} else {\n\t\tc.Errorf(\"Unable to send mail %v\",r)\n\t}\n}\n\n```\n\nKudos to [Matthew Zimmerman](https://github.com/mzimmerman) for this example.\n\n###Tests\n\nPlease run the test suite in before sending a pull request.\n\n```bash\ngo test -v\n```\n\n### TODO:\n* Add Versioning\n* Add proper support for BCC\n\n##MIT License\n\nEnjoy. Feel free to make pull requests :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeckarep%2Fsendgrid-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeckarep%2Fsendgrid-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeckarep%2Fsendgrid-go/lists"}