{"id":14384465,"url":"https://github.com/msztolcman/sendria","last_synced_at":"2025-04-07T07:13:16.294Z","repository":{"id":39095405,"uuid":"300835425","full_name":"msztolcman/sendria","owner":"msztolcman","description":"Sendria (formerly MailTrap) is a SMTP server designed to run in your dev/test environment, that is designed to catch any email you or your application is sending, and display it in a web interface instead of sending to real world.","archived":false,"fork":false,"pushed_at":"2022-11-18T12:32:20.000Z","size":1757,"stargazers_count":154,"open_issues_count":12,"forks_count":14,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-31T06:03:39.249Z","etag":null,"topics":["developer-tools","email","mail","mailcatcher","mailcatcher-alternative","maildump","maildump-alternative","mailtrap","mta-server","smtp","smtp-server"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/msztolcman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":null,"patreon":null,"open_collective":null,"ko_fi":"msztolcman","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-10-03T08:43:01.000Z","updated_at":"2025-03-10T13:35:09.000Z","dependencies_parsed_at":"2022-09-13T13:51:03.657Z","dependency_job_id":null,"html_url":"https://github.com/msztolcman/sendria","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztolcman%2Fsendria","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztolcman%2Fsendria/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztolcman%2Fsendria/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msztolcman%2Fsendria/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msztolcman","download_url":"https://codeload.github.com/msztolcman/sendria/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608153,"owners_count":20965952,"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":["developer-tools","email","mail","mailcatcher","mailcatcher-alternative","maildump","maildump-alternative","mailtrap","mta-server","smtp","smtp-server"],"created_at":"2024-08-28T18:01:24.590Z","updated_at":"2025-04-07T07:13:16.264Z","avatar_url":"https://github.com/msztolcman.png","language":"JavaScript","funding_links":["https://ko-fi.com/msztolcman"],"categories":["JavaScript"],"sub_categories":[],"readme":"Sendria\n==========\n\n[![sendria version](https://img.shields.io/pypi/v/sendria.svg)](https://pypi.python.org/pypi/sendria)\n[![sendria license](https://img.shields.io/pypi/l/sendria.svg)](https://pypi.python.org/pypi/sendria)\n[![sendria python compatibility](https://img.shields.io/pypi/pyversions/sendria.svg)](https://pypi.python.org/pypi/sendria)\n[![Downloads](https://static.pepy.tech/personalized-badge/sendria?period=total\u0026units=international_system\u0026left_color=grey\u0026right_color=yellow\u0026left_text=Downloads)](https://pepy.tech/project/sendria)\n[![say thanks!](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](https://saythanks.io/to/marcin%40urzenia.net)\n\nSendria (formerly MailTrap) is a SMTP server designed to run in your dev/test environment, catch any email you\nor your application is sending, and display it in a web interface instead of sending to real world.\nIt help you prevent sending any dev/test emails to real people, no matter what address you provide.\nJust point your app/email client to `smtp://127.0.0.1:1025` and look at your emails on `http://127.0.0.1:1080`.\n\nSendria is built on shoulders of:\n* [MailCatcher](https://mailcatcher.me/) - original idea comes of this tool by Samuel Cochran.\n* [MailDump](https://github.com/ThiefMaster/maildump) - base source code of `Sendria` (version pre 1.0.0), by Adrian Mönnich.\n\nIf you like this tool, just [say thanks](https://saythanks.io/to/marcin%40urzenia.net).\n\nIcon made by [Freepik](http://www.freepik.com/) from [www.flaticon.com](https://www.flaticon.com/).\n\nCurrent stable version\n----------------------\n\n2.2.2\n\nFeatures\n--------\n\n* Catch all emails and store it for display.\n* Full support for multipart messages.\n* View HTML and plain text parts of messages (if given part exists).\n* View source of email.\n* Lists attachments and allows separate downloading of parts.\n* Download original email to view in your native mail client(s).\n* Mail appears instantly if your browser supports [WebSockets](https://en.wikipedia.org/wiki/WebSocket).\n* Optionally, send webhook on every received message.\n* Runs as a daemon in the background, optionally in foreground.\n* Keyboard navigation between messages.\n* Optionally password protected access to web interface.\n* Optionally password protected access to SMTP (SMTP AUTH).\n* It's all Python!\n\nInstallation\n------------\n\n`Sendria` should work on any POSIX platform where [Python](http://python.org)\nis available, it means Linux, MacOS/OSX etc.\n\nSimplest way is to use Python's built-in package system:\n\n    python3 -m pip install sendria\n\nYou can also use [pipx](https://pipxproject.github.io/pipx/) if you don't want to\nmess with system packages and install `Sendria` in virtual environment:\n\n    pipx install sendria\n\nVoila!\n\nPython version\n--------------\n\n`Sendria` is tested against Python 3.7+. Older Python versions may work, or may not.\n\nIf you want to run this software on Python 2.6+, just use [MailDump](https://github.com/ThiefMaster/maildump).\n\nHow to use\n----------\n\n[After installing](#installation) `Sendria` just run command:\n\n    sendria --db mails.sqlite\n\nNow send emails through `smtp://127.0.0.1:1025`, i.e.:\n\n```shell\necho 'From: Sendria \u003csendria@example.com\u003e\\n'\\\n'To: You \u003cyou@example.com\u003e\\n'\\\n'Subject: Welcome!\\n\\n'\\\n'Welcome to Sendria!' | \\\n  curl smtp://localhost:1025 --mail-from sendria@example.com \\\n    --mail-rcpt you@example.com --upload-file -\n```\n\nor simpler with [SMTPc](https://github.com/msztolcman/smtpc/):\n\n```shell\nsmtpc send --host localhost:1025 --from sendria@example.com --to you@example.com \\\n  --subject 'Welcome!' --body 'Welcome to Sendria!'\n```\n\nFinally, look at `Sendria` GUI on [127.0.0.1:1080](http://127.0.0.1:1080).\n\nIf you want more details, run:\n\n    sendria --help\n\nfor more info, ie. how to protect access to gui.\n\n\nAPI\n---\n\n`Sendria` offers RESTful API you can use to fetch list of messages or particular message, ie. for testing purposes.\n\nYou can use excellent [httpie](https://httpie.org/) tool:\n\n```shell\n% http localhost:1080/api/messages/\nHTTP/1.1 200 OK\nContent-Length: 620\nContent-Type: application/json; charset=utf-8\nDate: Wed, 22 Jul 2020 20:04:46 GMT\nServer: Sendria/2.2.2 (https://sendria.net)\n\n{\n    \"code\": \"OK\",\n    \"data\": [\n        {\n            \"created_at\": \"2020-07-22T20:04:41\",\n            \"id\": 1,\n            \"peer\": \"127.0.0.1:59872\",\n            \"recipients_envelope\": [\n                \"you@example.com\"\n            ],\n            \"recipients_message_bcc\": [],\n            \"recipients_message_cc\": [],\n            \"recipients_message_to\": [\n                \"You \u003cyou@exampl.com\u003e\"\n            ],\n            \"sender_envelope\": \"sendria@example.com\",\n            \"sender_message\": \"Sendria \u003csendria@example.com\u003e\",\n            \"size\": 191,\n            \"source\": \"From: Sendria \u003csendria@example.com\u003e\\nTo: You \u003cyou@exampl.com\u003e\\nSubject: Welcome!\\nX-Peer: ('127.0.0.1', 59872)\\nX-MailFrom: sendria@example.com\\nX-RcptTo: you@example.com\\n\\nWelcome to Sendria!\\n\",\n            \"subject\": \"Welcome!\",\n            \"type\": \"text/plain\"\n        }\n    ],\n    \"meta\": {\n        \"pages_total\": 3\n    }\n}\n```\n\nThere are available endpoints:\n\n* `GET /api/messages/` - fetch list of emails. There is one query string param: `page` for pagination.\n* `DELETE /api/messages/` - delete all emails\n* `GET /api/messages/{message_id}.json` - fetch email metadata\n* `GET /api/messages/{message_id}.plain` - fetch plain part of email\n* `GET /api/messages/{message_id}.html` - fetch HTML part of email\n* `GET /api/messages/{message_id}.source` - fetch source of email\n* `GET /api/messages/{message_id}.eml` - download whole email as an EML file\n* `GET /api/messages/{message_id}/parts/{cid}` - download particular attachment\n* `DELETE /api/messages/{message_id}` - delete single email\n\nDocker\n------\n\nThere is also available [Docker image of Sendria](https://hub.docker.com/r/msztolcman/sendria).\nIf you want to try, just run:\n\n```shell\ndocker run -p 1025:1025 -p 1080:1080 msztolcman/sendria\n```\n\nHelp!\n-----\n\nI'm backend developer, not a frontend guy nor designer... If you are, and want to help, just [mail me!](mailto:marcin@urzenia.net).\nI think GUI should be redesigned, or at least few minor issues could be solved. Also, project requires some logo and/or icon. Again,\ndo not hesitate to [mail me](mailto:marcin@urzenia.net) if you want and can help :)\n\nAlso, if you have an idea how to enhance `Sendria`, [please fill the ticket](https://github.com/msztolcman/sendria/issues).\nEvery idea, every feature request can help you, me and others!\n\nConfigure Rails\n---------------\n\nFor your rails application just set in your `environments/development.rb`:\n\n    config.action_mailer.delivery_method = :smtp\n    config.action_mailer.smtp_settings = { :address =\u003e '127.0.0.1', :port =\u003e 1025 }\n    config.action_mailer.raise_delivery_errors = false\n\nConfigure Django\n----------------\n\nTo configure Django to work with `Sendria`, add the following to your projects' `settings.py`:\n\n    if DEBUG:\n        EMAIL_HOST = '127.0.0.1'\n        EMAIL_HOST_USER = ''\n        EMAIL_HOST_PASSWORD = ''\n        EMAIL_PORT = 1025\n        EMAIL_USE_TLS = False\n\nConfigure Laravel\n----------------\n\nTo use `Sendria` in a Laravel project, configure your `.env` file as follow:\n\n    MAIL_DRIVER=smtp\n    MAIL_HOST=127.0.0.1\n    MAIL_PORT=1025\n    MAIL_USERNAME=\n    MAIL_PASSWORD=\n    MAIL_ENCRYPTION=tcp\n    MAIL_FROM_ADDRESS=your@domain.com\n\nAs Sendria does not support TLS or SSL, it's very important to specify `MAIL_ENCRYPTION=tcp` (instead of the default `MAIL_ENCRYPTION=null`),\notherwise you will get a `Swift_TransportException` (with error `stream_socket_client(): unable to connect to null://127.0.0.1`).\n\nBehind nginx\n------------\n\nIf you want to hide `Sendria` behind nginx (ie. to terminate ssl) then you can [use example\nconfig (see in addons)](https://github.com/msztolcman/sendria/tree/master/addons/nginx.conf).\n\nSupervisord\n-----------\n\nTo start `Sendria` automatically with [Supervisor](https://supervisord.org/) there is in\n[addons example config file for this purpose](https://github.com/msztolcman/sendria/tree/master/addons/supervisor.conf).\n\nAuthors\n-------\n\n* Marcin Sztolcman ([marcin@urzenia.net](mailto:marcin@urzenia.net))\n* Adrian Mönnich (author of [MailDump](https://github.com/ThiefMaster/maildump), base of `Sendria`)\n\nContact\n-------\n\nIf you like or dislike this software, please do not hesitate to tell me about\nthis me via email ([marcin@urzenia.net](mailto:marcin@urzenia.net)).\n\nIf you find bug or have an idea to enhance this tool, please use GitHub's\n[issues](https://github.com/msztolcman/sendria/issues).\n\nChangeLog\n---------\n\n### v2.3.0\n\n* added configuration description for Laravel (thanks\n  [tuxfamily](https://github.com/tuxfamily) for PR)\n\n### v2.2.2\n\n* more dependencies fixes for Python 3.7\n\n### v2.2.1\n\n* updated deps in setup.py\n\n### v.2.2.0\n\n* added messages pagination. One page is 100 messages. Can be browsed using\n  buttons next to \"Search\" window or keyboard shortcuts: `Ctrl-Shift-[Cursor Left]`\n  or `Ctrl-Shift-[Cursor Right]`.\n* changed keyboard shortcuts: instead of `Ctrl-[Cursor Up]` and `Ctrl-[Cursor Down]`\n  there is now `Ctrl-Shift-[Cursor Up]` and `Ctrl-Shift-[Cursor Down]`.\n* allow configuring default `Sendria` instance using config file (see `sendria --help`\n  -\u003e `--config-file`).\n* some fixes after hints from linters\n* minor changes and fixes\n\n### v2.1.0\n\n* auth mechanisms are now implemented in [aiosmtpd](https://aiosmtpd.readthedocs.io)\n  (thanks [Arzaroth](https://github.com/Arzaroth) for PR)\n* huge improvements to handling DB inserts. Now all messages are stored in an internal queue,\n  then it's saved to the DB. It solves many problems with performance and single-threaded\n  SQLite (thanks [KathrynN](https://github.com/KathrynN) for reporting)\n* fixed API response when there is no data to return (#3) (\n  thanks [KathrynN](https://github.com/KathrynN) for reporting)\n* improved logging system, now log messages has log levels, also many simplifications in\n  logging system\n* Sendria now introduce as itself when connect through SMTP (also `--smtp-ident` CLI param added)\n* minor fixes and performance issues solved, updated dependencies\n* next step in cleanups and making code modern\n\n### v2.0.1\n\n* new icon (by [Freepik](http://www.freepik.com/) from [www.flaticon.com](https://www.flaticon.com/))\n\n### v2.0.0\n\n* rename MailTrap -\u003e Sendria\n\n### v1.0.0\n\n* complete rewrite of backend part. Sendria is using [asyncio](https://docs.python.org/3/library/asyncio.html) and\n  [aio-libs](https://github.com/aio-libs/) now:\n  * switch to [aiohttp](https://docs.aiohttp.org/) from Flask\n  * switch to [aiosmtpd](https://aiosmtpd.readthedocs.io) from [smtpd](https://docs.python.org/3/library/smtpd.html)\n  * switch to [aiosqlite](https://github.com/omnilib/aiosqlite) from [sqlite3](https://docs.python.org/3/library/sqlite3.html)\n  * changed logger to [structlog](https://www.structlog.org/)\n* using asynchronous version of libraries drastically improved performance\n* `Sendria` now can send a webhook about every received message\n* show in GUI information about envelope sender and recipients\n* all API requests has their own namespace now: `/api`\n* allow to replace name of application or url in template\n* block truncating all messages from GUI (on demand)\n* fixed issues with `WebSockets`, should refresh mails list and reconnect if disconnected\n* fixed issues with autobuilding assets\n* many cleanups and reformatting code\n* addons for [nginx](https://github.com/msztolcman/sendria/tree/master/addons/nginx.conf)\nand [supervisor](https://github.com/msztolcman/sendria/tree/master/addons/supervisor.conf)\n\n#### Backward incompatible changes:\n\n* all api's requests are now prefixed with `/api` (look at [API section](#api))\n* `--htpasswd` cli param is renamed to `--http-auth`\n\n### v0.1.6\n\n* fixed issue with old call do `gevent.signal`\n* minimum gevent version set to 1.5.0\n\n### v0.1.4\n\n* bumped dependencies - security issues ([dependabot](https://github.com/dependabot))\n\n### v0.1.3\n\n* fixed layout issues (thanks [radoslawhryciow](https://github.com/radoslawhryciow))\n\n### v0.1.2\n\n* fixed encoding issues\n\n### v0.1.0\n\n* better support for macOS/OSX\n* links now opens in new tab/window (added 'target=\"blank\"')\n* show message if there is no assets generated and info how to to generate them\n* added debugs for SMTP when in debug mode\n* added support for [Pipenv](https://docs.pipenv.org/)\n* HTML tab is default now when looking at particular message\n* converted to support Python 3.6+, drop support for lower Python versions\n* added SMTP auth support (look at [pull request 28](https://github.com/ThiefMaster/maildump/pull/28) )\n* copy from [MailDump](https://github.com/ThiefMaster/maildump) v0.5.6\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsztolcman%2Fsendria","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsztolcman%2Fsendria","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsztolcman%2Fsendria/lists"}