{"id":17994048,"url":"https://github.com/pepa65/mailer","last_synced_at":"2026-04-02T01:56:16.172Z","repository":{"id":57661776,"uuid":"409265680","full_name":"pepa65/mailer","owner":"pepa65","description":"Simple commandline mail sender","archived":false,"fork":false,"pushed_at":"2025-04-02T06:25:30.000Z","size":1099,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-02T07:27:21.399Z","etag":null,"topics":["cli","smtp","smtp-client"],"latest_commit_sha":null,"homepage":"","language":"Go","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/pepa65.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":"2021-09-22T15:51:46.000Z","updated_at":"2025-04-02T06:25:35.000Z","dependencies_parsed_at":"2024-06-20T11:14:33.683Z","dependency_job_id":"c97cf6e6-a983-441d-b41e-741e88d5e27b","html_url":"https://github.com/pepa65/mailer","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepa65%2Fmailer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepa65%2Fmailer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepa65%2Fmailer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pepa65%2Fmailer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pepa65","download_url":"https://codeload.github.com/pepa65/mailer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247123087,"owners_count":20887261,"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":["cli","smtp","smtp-client"],"created_at":"2024-10-29T20:13:51.125Z","updated_at":"2026-04-02T01:56:16.160Z","avatar_url":"https://github.com/pepa65.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/pepa65/mailer)](https://goreportcard.com/report/github.com/pepa65/mailer)\n\u003cimg src=\"https://raw.githubusercontent.com/pepa65/mailer/master/mailer.png\" width=\"120\" alt=\"mailer icon\" align=\"right\"\u003e\n\n# mailer - Simple commandline SMTP client\n* **v1.5.0**\n* Repo: [github.com/pepa65/mailer](https://github.com/pepa65/mailer)\n* No-install single binary.\n* Completely config-less, can send purely from the commandline.\n* But parameters can also be set in a configfile.\n* Can send plaintext, html, or both, and attachments.\n* Licence: GPLv3+\n\n## Install\n```\n# Download (replace BINARY by: mailer, mailer_pi, mailer_osx, mailer_bsd or mailer.exe)\nwget -O BINARY https://gitlab.com/pepa65/mailer/-/jobs/artifacts/master/raw/BINARY?job=building\n\n# Go get (If Golang is installed properly)\ngo install github.com/pepa65/mailer@latest\n\n# Go clone/install (If Golang is installed properly)\ngit clone https://github.com/pepa65/mailer; cd mailer; go install\n\n# Smaller binaries:\nCGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags=\"-s -w\"\nCGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags=\"-s -w\" -o mailer_pi\nCGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags=\"-s -w\" -o mailer_bsd\nCGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags=\"-s -w\" -o mailer_osx\nCGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags=\"-s -w\" -o mailer.exe\n\n# More extreme shrinking:\nupx --best --lzma mailer*\n\n# Move them to the local binary directory (if in your PATH):\nmv mailer* ~/bin/\n\n# Or move to a manually managed binaries location:\nsudo mv mailer* /usr/local/bin/\n```\n\n## Usage\n```\nmailer v1.5.0 - Simple commandline SMTP client [repo: github.com/pepa65/mailer]\nUsage:  mailer [ESSENTIALS] [BODY] [OPTIONS]\n    ESSENTIALS (like any option, can be set in a configfile):\n        -u|--user USER             For logging in to mail server. ^1\n        -p|--password PASSWORD     If PASSWORD is '-', it is read from stdin.\n        -t|--to EMAILS             To email(s). ^2\n        -s|--subject TEXTLINE      Subject line.\n    BODY (can be both plaintext and html, but each from either string or file):\n        -m|--message PLAINTEXT     Message string in plain text.\n        -M|--mfile FILENAME        File containing the plain text message.\n        -n|--nmessage HTML         Message string in html.\n        -N|--nfile FILENAME        File containing the html message.\n    OPTIONS:\n        -o|--options CONFIGFILE    File with options [default: mailer.yml]. ^3\n        -a|--attachment FILE       File to attach [multiple flags allowed]. ^4\n        -S|--server SERVER         Mail server [default: smtp.gmail.com].\n        -P|--port PORT             Port, like 25 or 465 [default: 587]. ^5\n        -T|--tls                   Use SSL/TLS instead of StartTLS. ^5\n        -c|--cc EMAILS             Cc email(s). ^2\n        -b|--bcc EMAILS            Bcc email(s). ^2\n        -r|--reply EMAILS          Reply-To email(s). ^2\n        -R|--read EMAILS           Email(s) to send ReadReceipts to. ^2\n        -U|--unsubscribe           Comma-separated unsubscribe targets. ^6\n        -f|--from NAME|EMAIL       The name to use with the USER's email. ^1\n        -h|--help                  Only show this help text.\n        -V|--version               Only show the version.\nNotes:\n    - Commandline options take precedence over CONFIGFILE options.\n    - Commandline errors print help text and the error to stdout and return 1.\n      Errors with sending are printed to stdout and return exitcode 2.\n    1. If USER is not an email address, '-f'/'--from' should have EMAIL!\n    2. EMAILs can be like \"you@and.me\" or like \"Some String \u003cyou@and.me\u003e\" and\n       can be strung together comma-separated. (Mind the shell's parsing!)\n    3. Could be the only option, if all ESSENTIALS and BODY options get set.\n       or if the default CONFIGFILE exists, no Commandline options are needed.\n    4. All given in the CONFIGFILE and on the commandline will be used.\n    5. StartTLS is the default, except when PORT is 465, then SSL/TLS is used.\n    6. Targets are email-addresses or URLs (no 'mailto:', 'https://' or '\u003c\u003e').\n```\n\nNote that in case of the `-U`/`--unsubscribe` flag, that besides a List-Unsubscribe header,\nalso a List-Unsubscribe-Post header is added if a URL is given, to make it One-Click.\nThis does require that the URL accepts POST, and does not require further interaction.\nThe To-address will be added at the end of the given URL, so structure the end like: `?email=`,\nand there should be only 1 To-address for this to be meaningful!\n\n### Configfile\nThe file given after `-o`/`--options` can be used to set some or all options,\nsee the example file `mailer.yml` in this repo. The default is `$PWD/mailer.yml`.\nThe field names are the same as the long option flags.\n\nThe YAML syntax for including blocks of text is tricky, using files instead is more predictable.\nWhen using `|+` to include blocks of text, note that `: ` (colon-space) and ` #` (space-hash)\nare likely to cause a YAML syntax error... Replace space with ` ` (no-break space, U+00A0).\nYAML also supports various quoting options, where a newline gets inserted on an empty line.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepa65%2Fmailer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpepa65%2Fmailer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpepa65%2Fmailer/lists"}