{"id":30794020,"url":"https://github.com/sendgrid/sendgrid-cobol","last_synced_at":"2026-03-08T16:34:21.938Z","repository":{"id":15568203,"uuid":"18303544","full_name":"sendgrid/sendgrid-cobol","owner":"sendgrid","description":"Official SendGrid library for Cobol","archived":false,"fork":false,"pushed_at":"2016-06-21T18:13:12.000Z","size":314,"stargazers_count":17,"open_issues_count":1,"forks_count":4,"subscribers_count":196,"default_branch":"master","last_synced_at":"2024-04-08T17:29:21.299Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sendgrid.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-03-31T18:30:09.000Z","updated_at":"2024-03-08T11:17:09.000Z","dependencies_parsed_at":"2022-09-12T07:12:04.536Z","dependency_job_id":null,"html_url":"https://github.com/sendgrid/sendgrid-cobol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sendgrid/sendgrid-cobol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fsendgrid-cobol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fsendgrid-cobol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fsendgrid-cobol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fsendgrid-cobol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sendgrid","download_url":"https://codeload.github.com/sendgrid/sendgrid-cobol/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sendgrid%2Fsendgrid-cobol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273782770,"owners_count":25167217,"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","status":"online","status_checked_at":"2025-09-05T02:00:09.113Z","response_time":402,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-09-05T16:26:48.977Z","updated_at":"2026-03-08T16:34:16.916Z","avatar_url":"https://github.com/sendgrid.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SendGrid Cobol Library\nThe easiest way to send emails in Cobol!\n\n\n## How to use\n\nInstalling Cobol, is now as easy as installing `open-cobol` in brew:\n\n```\n$ brew install open-cobol\n```\n\nIn our COBOL example, we are using Environment Variables.  You can set your own Environment Variables but following this link:\n\n\u003ca href=\"http://stackoverflow.com/questions/7501678/set-environment-variables-on-mac-os-x-lion\"\u003ehttp://stackoverflow.com/questions/7501678/set-environment-variables-on-mac-os-x-lion\u003c/a\u003e\n\nSet some SendGrid Credentials.  $SENDGRID_USERNAME  \u0026\u0026  $SENDGRID_PASSWORD.\n\nIn Cobol, we get Environment Variables and put them into variables, like so:\n\n```\n    ACCEPT SG-AUTH-USERNAME FROM ENVIRONMENT \"SENDGRID_USERNAME\".\n    ACCEPT SG-AUTH-PASSWORD FROM ENVIRONMENT \"SENDGRID_PASSWORD\".\n```\n\nTo send the email; call the function in libsendgrid `send_email` from cobol, and pass in the arguments. For an example on how to call this in the context of a complete Cobol application, look at the `sendgrid_demo.cbl` file in the root of the repo.\n\n```\n    CALL \"send_email\" USING SG-AUTH-USERNAME SG-AUTH-PASSWORD \n                            SG-MAIL-TO SG-MAIL-FROM \n                            SG-MAIL-SUBJECT SG-MAIL-BODY-TEXT.\n```\n\nSave the cobol source, and open terminal and navigate to the directory of the source code. Then call these functions:\n\n```\n$ cobc -c -static sendgrid_demo.cbl\n$ cobc -x -o sendgrid_demo sendgrid_demo.o libsendgrid.o\n```\n\nThis will now produce a executable binary called sendgrid_demo in the same folder as your source code. To execute it, just run:\n\n```\n$ ./sendgrid_demo\n```\n\nIf your email was sent, the output should look like this:\n\n```\n$ ./sendgrid_demo\nCreating POST Payload...  Done.\nSending POST Payload to SendGrid WebApi...  Done. Email Sent.\n```\n\n## Maintained By\n\n- Robin Johnson [@rbin](http://twitter.com/rbin)\n- Alex Reed [@alexerax](http://twitter.com/alexerax)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendgrid%2Fsendgrid-cobol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsendgrid%2Fsendgrid-cobol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsendgrid%2Fsendgrid-cobol/lists"}