{"id":20978741,"url":"https://github.com/sainnhe/container-mailer","last_synced_at":"2025-08-24T09:17:46.208Z","repository":{"id":97296702,"uuid":"582689787","full_name":"sainnhe/container-mailer","owner":"sainnhe","description":"Simple container image to send emails via SMTP","archived":false,"fork":false,"pushed_at":"2023-07-09T07:46:14.000Z","size":28,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T21:44:27.253Z","etag":null,"topics":["docker","podman","rust","sendmail","woodpecker-ci"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sainnhe.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-27T15:35:40.000Z","updated_at":"2025-02-26T22:07:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"c61fe87c-2934-446b-886a-8be85015c8d6","html_url":"https://github.com/sainnhe/container-mailer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sainnhe%2Fcontainer-mailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sainnhe%2Fcontainer-mailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sainnhe%2Fcontainer-mailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sainnhe%2Fcontainer-mailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sainnhe","download_url":"https://codeload.github.com/sainnhe/container-mailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254160648,"owners_count":22024574,"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":["docker","podman","rust","sendmail","woodpecker-ci"],"created_at":"2024-11-19T05:07:09.404Z","updated_at":"2025-05-14T14:32:48.310Z","avatar_url":"https://github.com/sainnhe.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Introduction\n\nThis is a simple container image to send emails via SMTP.\n\nIt is very small, the compressed size is only 3.92MB in x86_64 architecture, thus is very suitable for use in CI.\n\nYou can use it like this:\n\n```bash\ndocker run --name mailer --rm \\\n    -e MAILER_FROM_ADDRESS=\"user@example.com\" \\\n    -e MAILER_FROM_NAME=\"Your Name\" \\\n    -e MAILER_RECIPIENTS=\"foo@gmail.com,bar@outlook.com\" \\\n    -e MAILER_SUBJECT=\"Hello!\" \\\n    -e MAILER_BODY=\"This is\\nthe body.\" \\\n    -e MAILER_BODY_IS_HTML=\"false\" \\\n    -e MAILER_ATTACHMENT_PATH=\"/path/to/file\" \\\n    -e MAILER_ATTACHMENT_TYPE=\"text/plain\" \\\n    -e MAILER_USER_NAME=\"user@example.com\" \\\n    -e MAILER_PASSWORD=\"password\" \\\n    -e MAILER_HOST=\"smtp.example.com\" \\\n    -e MAILER_PORT=\"465\" \\\n    -e MAILER_USE_STARTTLS=\"false\" \\\n    ghcr.io/sainnhe/mailer:latest\n```\n\nThe executable is placed in `/usr/local/bin/mailer`, you can manually run it in a container.\n\nThis image is available in the following registries:\n\n- [`ghcr.io`](https://github.com/sainnhe/container-mailer/pkgs/container/mailer)\n- [`quay.io`](https://quay.io/repository/sainnhe/mailer)\n\n## Environment Variables\n\n- `MAILER_FROM_ADDRESS`: Send email from this address.\n- `MAILER_FROM_NAME`: The name of the sender.\n- `MAILER_RECIPIENTS`: Comma separated list of recipients to send the mail to.\n- `MAILER_SUBJECT`: The subject.\n- `MAILER_BODY`: The body. Use `\\n` to break new line.\n- `MAILER_BODY_IS_HTML` (optional): If set to `\"true\"`, `MAILER_BODY` is rendered in HTML. If set to `\"false\"`, `MAILER_BODY` is rendered in plain text. Default to `\"false\"`.\n- `MAILER_ATTACHMENT_PATH` (optional): Attachment file path. Default to `\"\"`.\n- `MAILER_ATTACHMENT_TYPE` (optional): Attachment file type. One of media types in [https://www.iana.org/assignments/media-types/media-types.xhtml](https://www.iana.org/assignments/media-types/media-types.xhtml). Default to `\"text/plain\"`.\n- `MAILER_USER_NAME`: SMTP user name.\n- `MAILER_PASSWORD`: SMTP password.\n- `MAILER_HOST`: SMTP host.\n- `MAILER_PORT`: SMTP port.\n- `MAILER_USE_STARTTLS`: If set to `\"false\"`, use TLS. If set to `\"true\"`, use STARTTLS.\n\n## Example\n\nHere is an example of using this image in [Woodpecker CI](https://woodpecker-ci.org):\n\n```yaml\nbranches: master\n\npipeline:\n  test:\n    image: \u003cyour-image\u003e\n    commands:\n      - \u003cyour-test-commands\u003e\n  notify:\n    image: ghcr.io/sainnhe/mailer:latest\n    commands:\n      - mailer\n    secrets:\n      [\n        MAILER_FROM_ADDRESS,\n        MAILER_FROM_NAME,\n        MAILER_RECIPIENTS,\n        MAILER_USER_NAME,\n        MAILER_PASSWORD,\n        MAILER_HOST,\n        MAILER_PORT,\n        MAILER_USE_STARTTLS,\n      ]\n    environment:\n      - MAILER_SUBJECT=Run Failed\n      - MAILER_BODY=${CI_BUILD_LINK}\n    when:\n      status:\n        - failure\n```\n\n## License\n\n[GPL3](./LICENSE) © sainnhe\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsainnhe%2Fcontainer-mailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsainnhe%2Fcontainer-mailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsainnhe%2Fcontainer-mailer/lists"}