{"id":23424316,"url":"https://github.com/reclosedev/lathermail","last_synced_at":"2026-02-24T19:40:24.256Z","repository":{"id":57438541,"uuid":"45182630","full_name":"reclosedev/lathermail","owner":"reclosedev","description":"SMTP Server with API for email testing inspired by mailtrap and maildump","archived":false,"fork":false,"pushed_at":"2020-08-21T11:43:19.000Z","size":73,"stargazers_count":13,"open_issues_count":4,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T10:52:24.701Z","etag":null,"topics":["email","python","smtp-server","test-automation","ui"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/reclosedev.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-29T12:48:00.000Z","updated_at":"2022-02-04T02:49:34.000Z","dependencies_parsed_at":"2022-08-29T08:41:24.314Z","dependency_job_id":null,"html_url":"https://github.com/reclosedev/lathermail","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reclosedev%2Flathermail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reclosedev%2Flathermail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reclosedev%2Flathermail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reclosedev%2Flathermail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reclosedev","download_url":"https://codeload.github.com/reclosedev/lathermail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248317732,"owners_count":21083528,"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":["email","python","smtp-server","test-automation","ui"],"created_at":"2024-12-23T04:16:43.734Z","updated_at":"2026-02-24T19:40:24.215Z","avatar_url":"https://github.com/reclosedev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":".. image:: https://travis-ci.org/reclosedev/lathermail.svg?branch=master\n    :target: https://travis-ci.org/reclosedev/lathermail\n\n.. image:: https://coveralls.io/repos/reclosedev/lathermail/badge.svg?branch=master\u0026service=github\n    :target: https://coveralls.io/github/reclosedev/lathermail?branch=master\n\nlathermail\n==========\n\nSMTP Server with API for email testing inspired by `mailtrap \u003chttps://mailtrap.io/\u003e`_ and\n`maildump \u003chttps://github.com/ThiefMaster/maildump\u003e`_\n\nCan store messages in MongoDB or any SQLAlchemy supported DB (e.g., sqlite). Supports Python 2.7, 3.4, 3.5, pypy.\n\nContains simple UI interface (AngularJS) to navigate and manage received messages.\n\nAvailable API clients:\n\n    * Python API client `lathermail_client \u003chttps://github.com/reclosedev/lathermail_client\u003e`_\n      (`PyPI \u003chttps://pypi.python.org/pypi/lathermail_client/\u003e`_).\n\nUsage::\n\n    $ virtualenv venv  # or mkvirutalenv lathermail\n    $ . venv/bin/activate\n    $ pip install lathermail\n    $ lathermail --help\n\n    usage: lathermail [-h] [--db-uri DB_URI] [--api-host API_HOST]\n                      [--api-port API_PORT] [--smtp-host SMTP_HOST]\n                      [--smtp-port SMTP_PORT]\n\n    optional arguments:\n      -h, --help            show this help message and exit\n      --db-uri DB_URI       DB URI, e.g. mongodb://localhost/lathermail,\n                            sqlite:////tmp/my.db (default:\n                            sqlite:///~/.lathermail.db)\n      --api-host API_HOST   API Host (default: 127.0.0.1)\n      --api-port API_PORT   API port (default: 5000)\n      --smtp-host SMTP_HOST\n                            SMTP host (default: 127.0.0.1)\n      --smtp-port SMTP_PORT\n                            SMTP port (default: 2525)\n\n\nIt will start SMTP server and API server in single process.\nAlso UI interface is available at API port (http://127.0.0.1:5000 by default)\n\nInboxes are identified by SMTP user/password pairs. lathermail intended to be used in single project environment.\n\nTo send email, just use SMTP client with auth support.\n\n\nAPI\n---\n\nTo request API, you must provide headers:\n\n* ``X-Mail-Password`` - same as SMTP password\n* ``X-Mail-Inbox`` - same as SMTP user. Optional, work with all inboxes if not specified\n\n**GET /api/0/inboxes/**\n\nReturns list of inboxes for passed ``X-Mail-Password``::\n\n    {\n        \"inbox_list\": [\n            \"first\",\n            \"second\",\n            \"third\"\n        ],\n        \"inbox_count\": 3\n    }\n\n\n**GET /api/0/messages/\u003cmessage_id\u003e**\n\nReturns single message. Example::\n\n    {\n        \"message_info\": {\n            \"message_raw\": \"Content-Type: multipart/mixed; boundary=\\\"===============3928630509694630745==...\",\n            \"password\": \"password\",\n            \"sender\": {\n                \"name\": \"Me\",\n                \"address\": \"asdf@exmapl.com\"\n            },\n            \"recipients\": [\n                {\n                    \"name\": \"Rcpt1\",\n                    \"address\": \"rcpt1@example.com\"\n                },\n                {\n                    \"name\": \"Rcpt2\",\n                    \"address\": \"rcpt2@example.com\"\n                },\n                {\n                    \"name\": \"\",\n                    \"address\": \"rcpt3@example.com\"\n                }\n            ],\n            \"recipients_raw\": \"=?utf-8?q?Rcpt1?= \u003crcpt1@example.com\u003e,\\n =?utf-8?q?Rcpt2?= \u003crcpt2@example.com\u003e, rcpt3@example.com\",\n            \"created_at\": \"2014-06-24T15:28:35.045000+00:00\",\n            \"sender_raw\": \"Me \u003casdf@exmapl.com\u003e\",\n            \"parts\": [\n                {\n                    \"index\": 0,\n                    \"body\": \"you you \\u043f\\u0440\\u0438\\u0432\\u0435\\u0442 2\",\n                    \"is_attachment\": false,\n                    \"charset\": \"utf-8\",\n                    \"filename\": null,\n                    \"type\": \"text/plain\",\n                    \"size\": 16\n                },\n                {\n                    \"index\": 1,\n                    \"body\": null,\n                    \"is_attachment\": true,\n                    \"charset\": null,\n                    \"filename\": \"t\\u0430\\u0441\\u0434est.txt\",\n                    \"type\": \"application/octet-stream\",\n                    \"size\": 12\n                }\n            ],\n            \"inbox\": \"inbox\",\n            \"_id\": \"53a960e3312f9156b7c92c5b\",\n            \"subject\": \"Test subject \\u0445\\u044d\\u043b\\u043b\\u043e\\u0443 2\",\n            \"read\": false\n        }\n    }\n\nAttachments in message have ``body`` = null. To download file, use following method.\n\n\n**GET /api/0/messages/\u003cmessage_id\u003e/attachments/\u003cattachment_index\u003e**\n\nReturns file from message. Works in browsers.\n\n\n**GET /api/0/messages/**\n\nReturns messages according to optional filters:\n\n* ``sender.name`` - Name of sender\n* ``sender.address`` - Email of sender\n* ``recipients.name`` - Name of any of recipients\n* ``recipients.address`` - Email of any of recipients\n* ``subject`` - Message subject\n* Add ``_contains`` suffix to any field above to search substring match,\n  e.g.: ``subject_contains``, ``recipients.address_contains``\n* ``created_at_lt`` - Filter messages created before this ISO formatted datetime\n* ``created_at_gt`` - Filter messages created after this ISO formatted datetime\n* ``read`` - Return only read emails when `True` or unread when `False`. All emails returned by default\n\nExample::\n\n    {\n        \"message_count\": 3,\n        \"message_list\": [\n            {\"_id\": ..., \"parts\": [...], ...},  // same as single message\n            {...},\n            {...}\n        ]\n    }\n\n**DELETE /api/0/messages/\u003cmessage_id\u003e**\n\nDeletes single message\n\n**DELETE /api/0/messages/**\n\nDeletes all messages in inbox. Also, you can filter deletable messages like in **GET /api/0/**\n\n\nConfiguration\n-------------\nCopy lathermail.conf.example, modify it, export environment variable before starting::\n\n    $ export LATHERMAIL_SETTINGS=/path/to/lathermail.conf\n    $ lathermail\n\n\nTo run tests::\n\n    $ python -m tests\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freclosedev%2Flathermail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freclosedev%2Flathermail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freclosedev%2Flathermail/lists"}