{"id":39075644,"url":"https://github.com/cloud-gov/pages-mailer","last_synced_at":"2026-01-17T18:26:28.732Z","repository":{"id":38022560,"uuid":"399134450","full_name":"cloud-gov/pages-mailer","owner":"cloud-gov","description":"An HTTP interface to send emails using an internal SMTP server.","archived":false,"fork":false,"pushed_at":"2025-10-15T23:15:04.000Z","size":454,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-10-17T00:55:10.234Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud-gov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-08-23T14:26:21.000Z","updated_at":"2025-10-15T23:13:58.000Z","dependencies_parsed_at":"2024-01-18T20:29:04.354Z","dependency_job_id":"a50e3dcb-9389-4b20-b259-9bb14cfee499","html_url":"https://github.com/cloud-gov/pages-mailer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cloud-gov/pages-mailer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fpages-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fpages-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fpages-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fpages-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-gov","download_url":"https://codeload.github.com/cloud-gov/pages-mailer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-gov%2Fpages-mailer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28515471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T17:57:59.192Z","status":"ssl_error","status_checked_at":"2026-01-17T17:57:52.527Z","response_time":85,"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-17T18:26:28.622Z","updated_at":"2026-01-17T18:26:28.698Z","avatar_url":"https://github.com/cloud-gov.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CodeQL](https://github.com/cloud-gov/pages-mailer/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/cloud-gov/pages-mailer/actions/workflows/codeql-analysis.yml)\n\n# Pages Mailer\n\nAn HTTP interface to send emails using an internal SMTP server.\n\nThis application provides a way for pages applications to send emails via the cloud.gov smtp server\nwithout each space having access to the required ASG. It is only accessible on the internal network\nand requires basic authentication.\n\n## Usage\n\nTo use `pages-mailer`:\n- create a `network-policy` on cloud.gov to allow container to container networking:\n\n  ```\n  # target the space containing the target app\n  cf target -s \u003ctarget-space\u003e\n\n  # add the network policy\n  cf add-network-policy \u003ctarget-app-name\u003e pages-mailer -s email -o gsa-18f-federalist\n  ```\n- include basic authentication credentials that match those in the `auth` user-provided-service in\n`email` space\n- send a POST request to the `/send` endpoint with required json data\n\n### Example\n```bash\ncurl -X POST \\\n-H \"Content-Type: application/json\" \\\n-u '\u003cusername\u003e:\u003cpassword\u003e' \\\n-d '{ \"html\": \"\u003ch1\u003eSome Email Content\u003c/h1\u003e\", \"subject\": \"Email Subject\", \"to\": [\"hello@agency.gov\"] }' \\\nhttp://pages-mailer.apps.internal:8080/send\n```\nNote: specying the port is required to reach the application over the internal network.\n\n## Configuration\n\nThe application can be configured via the following environment variables:\n\n| Variable                         |                                                             |\n| ---------------------------------|-------------------------------------------------------------|\n| AUTH_USERNAME                    | Basic authentication username                               |\n| AUTH_PASSWORD                    | Basic authentication password                               |\n| CF_INSTANCE_CERT                 | SSL Certificate (optional to support ssl)                   |\n| CF_INSTANCE_KEY                  | SSL Certificate Key (optional to support ssl)               |\n| FROM                             | Email address to send emails from                           |\n| HOST                             | Host for the http server                                    |\n| PORT                             | Port for the http server                                    |\n| SMTP_CERT                        | Certificate chain to trust for SMTP server                  |\n| SMTP_HOST                        | Hostname of SMTP server                                     |\n| SMTP_PASSWORD                    | Password for authentication with SMTP server                |\n| SMTP_PORT                        | Port for SMTP server                                        |\n| SMTP_USER                        | Username for authentication with SMTP server                |\n| TRANSPORT                        | The mailer transport: 'smtp' (leave empty for json)         |\n|                                  |                                                             |\n\n## cloud.gov Configuration\n\nConfiguration on cloud.gov is provided 2 ways:\n### For non-secret or feature-related values\nVia environment values listed under the `env` key in the [manifest](manifest.yml).\n\n### For secret values or external services\nVia cloud.gov `services` which are also listed under the `services` key in the [manifest](manifest.yml).\n\nValues provided via cloud.gov `services` are mapped to ordinary environment variables before the application starts, see [.profile](.profile) for details.\n\n## Pipeline Configuration\n\nThis application leverages [Concourse](https://concourse-ci.org) for its deployment\nautomation, but it's not dependent on it. You can find example and live\nconcourse configuration files in [the `ci/` directory](/ci).\n\n## Development\n\n### Requirements\n- `node 18.17`\n- `npm 7.x`\n\n### Get Started\n- `git clone git@github.com:cloud-gov/pages-mailer.git`\n- `cd pages-mailer`\n- `npm install`\n- `cp sample.env .env`\n- `npm run dev`\n\n### Testing\n`npm test`\n\n### Linting\n`npm run lint`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fpages-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-gov%2Fpages-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-gov%2Fpages-mailer/lists"}