{"id":16993329,"url":"https://github.com/janloebel/mailthat","last_synced_at":"2026-04-11T20:37:54.382Z","repository":{"id":94389769,"uuid":"359155074","full_name":"JanLoebel/mailthat","owner":"JanLoebel","description":"MailThat is a kind of proxy/service to forward mails from HTTP-Requests or received via SMTP.","archived":false,"fork":false,"pushed_at":"2021-04-18T13:46:51.000Z","size":94,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-27T06:12:46.724Z","etag":null,"topics":["http","mail","proxy","rest","smtp"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JanLoebel.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-04-18T13:45:52.000Z","updated_at":"2021-04-18T13:49:18.000Z","dependencies_parsed_at":"2023-04-16T05:35:41.158Z","dependency_job_id":null,"html_url":"https://github.com/JanLoebel/mailthat","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/JanLoebel%2Fmailthat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanLoebel%2Fmailthat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanLoebel%2Fmailthat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JanLoebel%2Fmailthat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JanLoebel","download_url":"https://codeload.github.com/JanLoebel/mailthat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244909426,"owners_count":20530231,"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":["http","mail","proxy","rest","smtp"],"created_at":"2024-10-14T03:42:53.150Z","updated_at":"2025-10-17T22:03:04.360Z","avatar_url":"https://github.com/JanLoebel.png","language":"TypeScript","funding_links":["https://www.buymeacoffee.com/JanLoebel"],"categories":[],"sub_categories":[],"readme":"# MailThat\n\nMailThat is a kind of proxy/service to forward mails from HTTP-Requests or received via SMTP.\n\n\u003ca href=\"https://www.buymeacoffee.com/JanLoebel\" rel=\"Buy me a coffee!\"\u003e![Foo](https://cdn.buymeacoffee.com/buttons/default-orange.png)\u003c/a\u003e\n\n## WORK IN PROGRESS - HELP IS WELCOME\\*\\*\n\n- Test real email server (outgoing smtp options)\n- Add example key / cert file for secure serving\n- Add smtp tests\n- Add more documentation how to configure and run\n- Add form based submit\n- Add more predefined authentication strategies for HTTP\n- [https://www.npmjs.com/package/tslog](https://www.npmjs.com/package/tslog) -\u003e Add request id for http logging\n\n## Basic idea\n\nProviding a small service to fullfil two services regarding sending emails.\n\n### HTTP\n\nIf you just want a HTTP-API to send emails with overwritable properties you can just use MailThat to provide these API.\n\n### SMTP\n\nWhile using different services (Wordpress, others..) you always have to configure a mail services. But what if you use e.g.: a private GMAIL account. And you don't want to enter you're password in different services? With MailThat you can just create a new user and enter these credentials to the services and just use the _real_ credentials in MailThat itself. So MailThat will work as a _MailRelay_.\n\n## How to start\n\nBasically there are two ways, use the source code or simply use docker to start the service.\n\n### Source Code\n\n- Start by cloning the repository: `git clone https://github.com/JanLoebel/mailthat.git`\n- Change into the cloned directory: `cd mailthat`\n- Run `npm install` to install all needed dependencies\n- If you just want to start mailthat run: `npm start`\n- If you want to start mailthat and watch for changes run: `npm run start:dev`\n\n### Docker\n\nThe docker image is published to the docker hub registry. Therefore it's pretty simple to use docker to get started. In the directory `docker-example` you can find an example config and `docker-compose` file. The `docker-compose` file just start the docker image with the config directory as a mounted volume to provide the example config to the service. If you don't want to use `docker-compose` you can also change to the `docker-example` directory and execute `docker run -it --rm -v $(pwd)/config:/config mailthat`.\n\n## Configuration options\n\nThe configuration is a json file which will be validated on startup. For an example file checkout `config/config.json` or `docker-example/config/config.json`. They are more easy readable then the available options here ;)\n\n| Option         | Description                                                                                              |\n| -------------- | -------------------------------------------------------------------------------------------------------- |\n| `outgoingSmtp` | _Required_ Server configuration, see `OutgoingSmtp configuration options`.\u003cbr\u003e\u003cbr\u003e**Type:** `object`\u003cbr\u003e |\n| `httpServices` | _Optional_ Array of HttpServices, see `HttpServices configuration options`.\u003cbr\u003e\u003cbr\u003e**Type:** `array`\u003cbr\u003e |\n| `smtpServices` | _Optional_ Array of SmtpServices, see `SmtpServices configuration options`.\u003cbr\u003e\u003cbr\u003e**Type:** `array`\u003cbr\u003e |\n\n### OutgoingSmtp configuration options\n\n| Option      | Description                                                                   |\n| ----------- | ----------------------------------------------------------------------------- |\n| `host`      | _Required_ Server port to listen.\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e               |\n| `port`      | _Required_ Server port to listen.\u003cbr\u003e\u003cbr\u003e**Type:** `number`\u003cbr\u003eDefault: 3000  |\n| `ignoreTLS` | _Optional_ Server port to listen.\u003cbr\u003e\u003cbr\u003e**Type:** `boolean`\u003cbr\u003eDefault: 3000 |\n| `secure`    | _Optional_ Server port to listen.\u003cbr\u003e\u003cbr\u003e**Type:** `boolean`\u003cbr\u003eDefault: 3000 |\n\n### HttpServices configuration options\n\n| Option     | Description                                                                                         |\n| ---------- | --------------------------------------------------------------------------------------------------- |\n| `port`     | _Required_ HTTP-Server port to listen.\u003cbr\u003e\u003cbr\u003e**Type:** `number`\u003cbr\u003e                                |\n| `auth`     | _Optional_ Authentication options, see `HTTP Authentication options`.\u003cbr\u003e\u003cbr\u003e**Type:** `object`\u003cbr\u003e |\n| `defaults` | _Optional_ Default values, see `Defaults configuration options`.\u003cbr\u003e\u003cbr\u003e**Type:** `object`\u003cbr\u003e      |\n\n### Http Authentication configuration options\n\n| Option     | Description                                                                                   |\n| ---------- | --------------------------------------------------------------------------------------------- |\n| `type`     | _Required_ Which type should be used. Options: `basic`\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e          |\n| `username` | _Required if type === basic_ Username for basic authentication.\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e |\n| `password` | _Required if type === basic_ Password for basic authentication.\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e |\n\n### SmtpServices configuration options\n\n| Option        | Description                                                                                                                                                                                           |\n| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `port`        | _Required_ SMTP-Server port to listen.\u003cbr\u003e\u003cbr\u003e**Type:** `number`\u003cbr\u003e                                                                                                                                  |\n| `auth`        | _Optional_ Authentication options, see `SMTP Authentication options`.\u003cbr\u003e\u003cbr\u003e**Type:** `object`\u003cbr\u003e                                                                                                   |\n| `defaults`    | _Optional_ Default values, see `Defaults configuration options`.\u003cbr\u003e\u003cbr\u003e**Type:** `object`\u003cbr\u003e                                                                                                        |\n| `allowedIps`  | _Optional_ The ip values of clients that are allowed to connect, e.g: `127.0.0.1` then only the local host can connect to the smtp server.\u003cbr\u003e\u003cbr\u003e**Type:** `array\u003cstring\u003e`\u003cbr\u003e                       |\n| `secure`      | _Optional_ Should the smtp services served secure, if you want to enable it you will have to provide the file path to the `key` and `cert`-files as an object.\u003cbr\u003e\u003cbr\u003e**Type:** `false \\| object`\u003cbr\u003e |\n| `secure.cert` | _Required if secure_ File path to the `cert`-file.\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e                                                                                                                      |\n| `secure.key`  | _Required if secure_ File path to the `key`-file.\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e                                                                                                                       |\n\n### Smtp Authentication configuration options\n\n| Option     | Description                                                                                   |\n| ---------- | --------------------------------------------------------------------------------------------- |\n| `type`     | _Required_ Which type should be used. Options: `basic`\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e          |\n| `username` | _Required if type === basic_ Username for basic authentication.\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e |\n| `password` | _Required if type === basic_ Password for basic authentication.\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e |\n\n### Defaults configuration options\n\n| Option    | Description                                                                                                                  |\n| --------- | ---------------------------------------------------------------------------------------------------------------------------- |\n| `to`      | _Optional_ Define email recipient (overwrites the value received if defined).\u003cbr\u003e\u003cbr\u003e**Type:** `string \\| array\u003cstring\u003e`\u003cbr\u003e |\n| `from`    | _Optional_ Define email sender (overwrites the value received if defined).\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e                     |\n| `subject` | _Optional_ Define email subject (overwrites the value received if defined).\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e                    |\n| `text`    | _Optional_ Define email text/body (overwrites the value received if defined).\u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e                  |\n\n## Contribution\n\nPlease feel free to improve or modify the code and open a Pull-Request! Any contribution is welcome :)\n\n## License\n\nMIT License\n\nCopyright (c) 2021 Jan Löbel\n\nSee LICENSE file for details.\n\n## Alternative projects\n\n- [mailit](https://github.com/Rahul-Bisht/mailit)\n-\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanloebel%2Fmailthat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanloebel%2Fmailthat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanloebel%2Fmailthat/lists"}