{ "info": { "author": "Trevor Morgan", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# MailMitt\n\nMailMitt is a tool for performing regression testing on email delivery code. \nIt allows applications to send emails to an SMTP server without actual emails \nbeing delivered to anyone.\n\nIt also provides both a web interface and a RESTful JSON API for reviewing the \ncontent of the emails that you send.\n\nNothing is actually delivered, and any emails that MailMitt receives are just\nstored in memory.\n\nIt is inspired by https://github.com/ThiefMaster/maildump, although it is \nre-written from the ground up using an asyncio-based event loop rather than gevent.\n\nBecause of this, it only runs on Python 3.5 and above, whereas MailDump only runs on \nPython 2.\n\n## Installation\n\n\n```bash \npip3 install mailmitt\n```\n\n## Usage\n\n`mailmitt --help`\n\nproduces a list of available command line arguments.\n\nBy default mailmitt runs its webserver on port\n1080 and its SMTP server on port 1025 (both only available via localhost). If \nyou want to access it from another machine, use something like this:\n\n`mailmitt --http-ip 0.0.0.0 --smtp-ip 0.0.0.0`\n\n\n## API\n\n\n`GET http://localhost:1080/messages`\n\n* Gets all emails, including their content, as a JSON tree.\n\n`GET http://localhost:1080/messages/0.source`\n\n* Gets the source for the first email. Replace `0` with the index of the email you wish to retrieve\n\n`GET http://localhost:1080/messages/0.plain`\n\n* Gets the plaintext version of the first email. \n\n`GET http://localhost:1080/messages/0.html`\n\n* Gets the HTML version of the first email if it exists. \n\n`GET http://localhost:1080/messages/0.json`\n\n* Gets a JSON representation of the first email.\n\n`DELETE http://localhost:1080/messages`\n\n* Deletes all emails from memory\n\n\n## Sample Usage\n\nRun this in one terminal:\n```bash\nmailmitt\n```\n\nAnd then in a python3 session:\n\n```python\nimport requests\nimport smtplib\nfrom email.message import EmailMessage\n\nmessage = EmailMessage()\nmessage['Subject'] = \"Sample Subject\"\nmessage['To'] = \"to@example.com\"\nmessage['From'] = \"from@example.com\"\n\nmessage.set_content(\"\"\"\\\nHello\nThis is a sample email\n\"\"\")\n\nmessage.add_alternative(\"\"\"\n

Hello

\n

This is a sample email

\n\"\"\", subtype='html')\n\nwith smtplib.SMTP('localhost',port=1025) as smtp:\n smtp.sendmail(message['From'],message['To'],message.as_string()) \n\nprint(requests.get('http://localhost:1080/messages/0.plain').text.strip())\n```\n\n\nAlthough this example is in Python, MailMitt can be accessed from SMTP client \nlibraries in any language.\n\n```\nHello\nThis is a sample email\n```\n\n## Webserver\nYou will also be able to review your emails at http://localhost:1080/\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/trvrm/mailmitt", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "mailmitt", "package_url": "https://pypi.org/project/mailmitt/", "platform": "", "project_url": "https://pypi.org/project/mailmitt/", "project_urls": { "Homepage": "https://github.com/trvrm/mailmitt" }, "release_url": "https://pypi.org/project/mailmitt/0.0.4/", "requires_dist": [ "aiohttp", "aiosmtpd", "bottle" ], "requires_python": ">=3.5", "summary": "Simple SMTP server for testing mailing code.", "version": "0.0.4" }, "last_serial": 4455183, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "70d4713773f0bb04292943f1c8e5b111", "sha256": "1c21405fa416ad80817b3202924e9b8973cc9b54e65de82477cf7b7bbdebe80c" }, "downloads": -1, "filename": "mailmitt-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "70d4713773f0bb04292943f1c8e5b111", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5639, "upload_time": "2018-11-05T20:51:10", "url": "https://files.pythonhosted.org/packages/a7/21/36d779d8c979b0b10a567a3ca04140364e829e1b58ddd32712566280ca7e/mailmitt-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ed0853564176db777db2b9a017376794", "sha256": "9fce1a8230ae6baf2508026c2617224034dc0f01ebf089bb79824f5cfca6b925" }, "downloads": -1, "filename": "mailmitt-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ed0853564176db777db2b9a017376794", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3330, "upload_time": "2018-11-05T20:51:12", "url": "https://files.pythonhosted.org/packages/e6/03/444bc495bf1dfba5cb427ea18a5f311d5d96375e2704dd33cbf7b0f38485/mailmitt-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "05b172dffaf8ab8e40bc5a5ba5c98a6d", "sha256": "29170243cf1d227c3d7deaa5724eb133362e81b71f5e619c67447a7f9a07bf86" }, "downloads": -1, "filename": "mailmitt-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "05b172dffaf8ab8e40bc5a5ba5c98a6d", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 5823, "upload_time": "2018-11-05T21:09:14", "url": "https://files.pythonhosted.org/packages/23/9c/ef087b0f8a8e0685cf63df8db5eefdf2500039a8fe204504a20adc89ba08/mailmitt-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "94fc95b369e599b52e0cc8825923e639", "sha256": "de6a0bc68bce9ac34dad6298cf8f74ac6f6d0ae68559080dc00037bfb0168ea3" }, "downloads": -1, "filename": "mailmitt-0.0.2.tar.gz", "has_sig": false, "md5_digest": "94fc95b369e599b52e0cc8825923e639", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 3432, "upload_time": "2018-11-05T21:09:16", "url": "https://files.pythonhosted.org/packages/bf/9e/580fd5d6924e1de226dee37704ce2986ca937b4aba8cff578ac886e33773/mailmitt-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "f3a10274df4364e093303096b0a2ae4a", "sha256": "b4eb1e368601077ce97b9baa5f926253081876dcda0dc34e2e74d856a96c5416" }, "downloads": -1, "filename": "mailmitt-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "f3a10274df4364e093303096b0a2ae4a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 12550, "upload_time": "2018-11-05T22:08:48", "url": "https://files.pythonhosted.org/packages/97/17/b8638e77103681ddff2a5f48d32030a9ae471c6807e03764f9855b8ac1bc/mailmitt-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de8d1b4671e63b03daa41361db0b303d", "sha256": "3a213c389a697a43919d43ddcdb0b102aadaaed29a9d98d93a0a2e8cd38a9f6a" }, "downloads": -1, "filename": "mailmitt-0.0.3.tar.gz", "has_sig": false, "md5_digest": "de8d1b4671e63b03daa41361db0b303d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 9457, "upload_time": "2018-11-05T22:08:51", "url": "https://files.pythonhosted.org/packages/2d/5a/b3e2b0b34084e66e00b79d7e00d2c13745c41a9ef6f202edf5e5e7676953/mailmitt-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c2192b5982a6a346ce4be2a42f4447af", "sha256": "4bda08171073bf3ec8872fcc3f094b82b26205bad6a1124dac21a91740b07698" }, "downloads": -1, "filename": "mailmitt-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "c2192b5982a6a346ce4be2a42f4447af", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 14729, "upload_time": "2018-11-05T23:17:17", "url": "https://files.pythonhosted.org/packages/0c/91/2d1dcf4a9713a53c969b9fd6eecb127b830fcd3f186ebbe0986abc2e80ae/mailmitt-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39582b38a33d381219c0ce6e4f03ac5c", "sha256": "9a9f7f1c49c6241d4b0c327a8302ec011d374ad56b1ebdc62fc00a9409ae91f6" }, "downloads": -1, "filename": "mailmitt-0.0.4.tar.gz", "has_sig": false, "md5_digest": "39582b38a33d381219c0ce6e4f03ac5c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 10817, "upload_time": "2018-11-05T23:20:19", "url": "https://files.pythonhosted.org/packages/4e/a1/7c773e36231fa12157e8d5d66a8be693c46b68c4a1f0800df8adf5ac4237/mailmitt-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c2192b5982a6a346ce4be2a42f4447af", "sha256": "4bda08171073bf3ec8872fcc3f094b82b26205bad6a1124dac21a91740b07698" }, "downloads": -1, "filename": "mailmitt-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "c2192b5982a6a346ce4be2a42f4447af", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 14729, "upload_time": "2018-11-05T23:17:17", "url": "https://files.pythonhosted.org/packages/0c/91/2d1dcf4a9713a53c969b9fd6eecb127b830fcd3f186ebbe0986abc2e80ae/mailmitt-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "39582b38a33d381219c0ce6e4f03ac5c", "sha256": "9a9f7f1c49c6241d4b0c327a8302ec011d374ad56b1ebdc62fc00a9409ae91f6" }, "downloads": -1, "filename": "mailmitt-0.0.4.tar.gz", "has_sig": false, "md5_digest": "39582b38a33d381219c0ce6e4f03ac5c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 10817, "upload_time": "2018-11-05T23:20:19", "url": "https://files.pythonhosted.org/packages/4e/a1/7c773e36231fa12157e8d5d66a8be693c46b68c4a1f0800df8adf5ac4237/mailmitt-0.0.4.tar.gz" } ] }