{ "info": { "author": "Andriy Yurchuk", "author_email": "ayurchuk@minuteware.net", "bugtrack_url": null, "classifiers": [], "description": "mailhole\n========\n\n**A simple application to test email sending functionality**\n\nThe application starts two servers:\n\n- a simple SMTP server that when it receives an email saves it into a file in JSON format;\n- a simple HTTP server that serves files in the directory where SMTP server puts them.\n\nDefault behavior is to listen on :code:`127.0.0.1:4025` for SMTPconnections and :code:`127.0.0.1:4080` for HTTP connetctions,\nwrite email files into current directory and log to STDOUT.\nAll of these settings can be overridden with command-line options. Also a configuration file can be specified.\n\nHelp::\n\n $ mailhole -h\n usage: mailhole.py [-h] [-m SMTP_HOST] [-p SMTP_PORT] [-t HTTP_HOST]\n [-q HTTP_PORT] [-d MAILDIR] [-l LOG_FILE] [-c CONFIG_FILE]\n\n optional arguments:\n -h, --help show this help message and exit\n -m SMTP_HOST, --smtp_host SMTP_HOST\n SMTP server host (default: 127.0.0.1)\n -p SMTP_PORT, --smtp_port SMTP_PORT\n SMTP server port (default: 4025)\n -t HTTP_HOST, --http_host HTTP_HOST\n HTTP server host (default: 127.0.0.1)\n -q HTTP_PORT, --http_port HTTP_PORT\n HTTP server port (default: 4080)\n -d MAILDIR, --maildir MAILDIR\n Directory where emails are stored (default:\n /Users/ay/PycharmProjects/mailhole)\n -l LOG_FILE, --log_file LOG_FILE\n Log file (default: None)\n -c CONFIG_FILE, --config_file CONFIG_FILE\n Config file path (default: None)\n\n Default behavior is to listen on 127.0.0.1:4025 for SMTPconnections and\n 127.0.0.1:4080 for HTTP connetctions, write email files into current directory\n and log to STDOUT. All of these settings can be overridden with the options\n above. Also a configuration file can be specified that must contain all the\n above options.\n\nInstallation\n------------\n\nTo install simply run::\n\n pip install mailhole\n\nRunning\n-------\n\nStart mailhole::\n\n $ mailhole\n [2014-09-02, 13:04:17]: INFO: SMTP server listening on 127.0.0.1:4025\n [2014-09-02, 13:04:17]: INFO: HTTP server listening on 127.0.0.1:4080\n\nIn another terminal send an email via a telnet connection::\n\n $ telnet 127.0.0.1 4025\n Trying 127.0.0.1...\n Connected to localhost.\n Escape character is '^]'.\n 220 ay-air Python SMTP proxy version 0.2\n MAIL FROM: sender@mailhole.net\n 250 Ok\n RCPT TO: recepient@mailhole.net\n 250 Ok\n DATA\n 354 End data with .\n From: sender@mailhole.net\n To: recepient@mailhole.net\n Subject: Testing mailhole\n\n Hi!\n This is a mailhole test email\n\n .\n 250 Ok\n ^]\n telnet> Connection closed.\n\nThen in the terminal with mailhole running you should get this log line::\n\n [2014-09-02, 13:20:43]: DEBUG: {'body': ['Hi!\\nThis is a mailhole test email\\n'], 'to': ['recepient@mailhole.net'], 'from': 'sender@mailhole.net', 'headers': {'To': 'recepient@mailhole.net', 'From': 'sender@mailhole.net', 'Subject': 'Testing mailhole'}}\n\nTo test the HTTP server a simple curl request would work::\n\n $ curl 127.0.0.1:4080/testing_mailhole__recepient@mailhole.net\n {\"body\": [\"Hi!\\nThis is a mailhole test email\\n\"], \"to\": [\"recepient@mailhole.net\"], \"from\": \"sender@mailhole.net\", \"headers\": {\"To\": \"recepient@mailhole.net\", \"From\": \"sender@mailhole.net\", \"Subject\": \"Testing mailhole\"}}[2.1.2][refactoring] ~/PycharmProjects/gun", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Ch00k/mailhole", "keywords": null, "license": "LICENSE.txt", "maintainer": null, "maintainer_email": null, "name": "mailhole", "package_url": "https://pypi.org/project/mailhole/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/mailhole/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/Ch00k/mailhole" }, "release_url": "https://pypi.org/project/mailhole/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "A simple application to test email sending functionality", "version": "0.0.1" }, "last_serial": 1210245, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "6869d15a1e091b3e38f8a6f70cf0ca0e", "sha256": "793b9f7f785c02b07600d97ad744d84d4993054fc9d599619e9b4a387ddbabdd" }, "downloads": -1, "filename": "mailhole-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6869d15a1e091b3e38f8a6f70cf0ca0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4194, "upload_time": "2014-09-02T12:07:42", "url": "https://files.pythonhosted.org/packages/ad/67/dd6d64e09bc6f4146945c7c96211733376f279ac55af813fe66258d61c96/mailhole-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6869d15a1e091b3e38f8a6f70cf0ca0e", "sha256": "793b9f7f785c02b07600d97ad744d84d4993054fc9d599619e9b4a387ddbabdd" }, "downloads": -1, "filename": "mailhole-0.0.1.tar.gz", "has_sig": false, "md5_digest": "6869d15a1e091b3e38f8a6f70cf0ca0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4194, "upload_time": "2014-09-02T12:07:42", "url": "https://files.pythonhosted.org/packages/ad/67/dd6d64e09bc6f4146945c7c96211733376f279ac55af813fe66258d61c96/mailhole-0.0.1.tar.gz" } ] }