{ "info": { "author": "Tomasz Waraksa", "author_email": "tomasz@waraksa.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.5", "Topic :: Communications :: Email", "Topic :: Utilities" ], "description": "Introduction\n============\n\n``pmail`` is used to quickly send e-mail messages from command line.\n\nGit repository: https://bitbucket.org/tomaszwaraksa/pmail\n\nSending e-mails from command-line? Easy!\n----------------------------------------\n\nSurely there are plenty of tools for that, to begin with mail and ssmtp\non ``*x`` systems. Unfortunately, they\u2019re not for the weak of heart.\nJust look here for the available options:\nhttps://tecadmin.net/ways-to-send-email-from-linux-command-line/\n\nYeah\u2026\n\nThat\u2019s a lot of typing for something simple. Admittedly, all those\n``cat`` and ``< dev null`` are clever hacks, but honestly, they are also\nan utter waste of time and long-term memory. And, because of complexity,\nthey often result in failure and frustration. Eventually, after a brief\nlove story, you would stop using command line for sending e-mails. And\nit would be a terrible loss for humanity, given how much time is wasted\nwatching Thunderbird e-mail client load.\n\nSo, is there a better way?\n\nLo and behold, I give you ``pmail``. A nifty command-line e-mail sender,\nwritten in Python.\n\npmail is simple\n---------------\n\nWith ``pmail`` sending an e-mail from command line is a breeze:\n\n::\n\n pmail hq@google.com Hi! \"Wasup?\\n\\nJohn\"\n\nReminder mail to yourself? Easy:\n\n::\n\n pmail me \"Shopping list\" \"Cat food\\nWater\\nBread\\nCookies\"\n\nAnd it can be even simpler. If you want, you can send a message in\ninteractive mode. Just type:\n\n::\n\n pmail\n\nand the application will ask you to enter the recipient, subject and\nmessage body:\n\n::\n\n From: john@doe.com\n To: ceo@google.com \n Subject: New design\n Body: Please find attached some ideas for Gmail.\\n\\nCheers,\\n\\nBob\n Attachments: ~/docs/gmail-commandline.pdf\n\nNo need of course to enter ``From:`` or ``To:`` prefixes. Our\nsuper-intelligent cloud-connected AI will figure this out for you. And,\nafter years of tedious training our deep learning algos are now able to\nfigure out that an empty line has to be transmitted between message\nsubject and body! Oh my goodness!\n\nPrerequisities\n--------------\n\nTo run ``pmail`` you need Python 3 interpreter on your computer. At\nminimum, Python version ``3.5`` is required. You can verify whether it\u2019s\navailable using the following commands:\n\n::\n\n python --version\n pip --version\n\nIf you happen to have both Python 2.\\* and Python 3.\\* on your machine,\nin all examples below you will rather use ``python3`` and ``pip3``\ncommands, so that the right Python version is used.\n\nInstallation\n============\n\nInstallation from Python Package Index\n--------------------------------------\n\nThe simplest way to is to install the application from ``PyPI``\nrepository, using the following command:\n\n::\n\n pip install pmail\n\nOn ``*ux`` system you need to run it with administrative privileges, to\nhave ``pmail`` command globally available:\n\n::\n\n sudo pip install pmail\n\nIf it doesn\u2019t work, it probably means you need to install Python 3 on\nyour computer. Check https://www.python.org/downloads/ to find out how\nto install Python on your platform.\n\nManual installation\n-------------------\n\n1. Unzip the sources or clone the repository\n https://bitbucket.org/tomaszwaraksa/pmail.git\n2. Navigate to the folder with the sources\n3. Run ``pip install -e .``\n4. If you\u2019ll ever update the sources, just re-run the same command again\n5. Enjoy!\n\nConfiguration\n=============\n\nBefore you can send your first e-mail, you need to provide some\ninformation about the SMTP server through which ``pmail`` will send your\nmessages to the world. Just type:\n\n::\n\n pmail --configure\n\nThe application will guide you through configuration steps, asking for:\n\n::\n\n SMTP host:\n SMTP port:\n Login:\n Password:\n Security:\n Sender name:\n Sender address:\n\nYou have to consult your e-mail provider for these values. Few tips:\n\n- No need to prefix the SMTP host with anything, just the pure domain\n name, for example ``smtp.godaddy.com``\n- ``Login`` and ``Sender address`` are usually the same, just your\n e-mail address\n- ``Security`` can be set to ``ssl``, ``tls`` or ``none``. Please,\n please, use ``tls`` whenever your e-mail provider supports it, which\n seems to be the norm these days.\n\nOnce you\u2019re done entering configuration, ``pmail`` attempts to send a\ntest message to verify whether the settings are correct. If the message\nhas arrived into your mailbox, everything is fine and you can start\nusing ``pmail``!\n\nIf at any moment in future you\u2019d like to change configuration, use the\nsame command to change it.\n\n Configuration is stored in ``~/.pmail/configuration.json`` file, so\n you can edit it manually. The exception is login and password, which\n are stored as encrypted. To change these, you need to run\n ``pmail --configure`` like described above.\n\nSending e-mails\n===============\n\nSending e-mails in interactive mode\n-----------------------------------\n\nTo send an e-mail, simply type:\n\n::\n\n `pmail`\n\nThe application will ask you to enter e-mail recipient, subject, body\nand eventual attachments. Just press ENTER to confirm each entry. Once\nyou\u2019ve entered the body, e-mail message will be sent and confirmation\nmessage displayed. If anything goes wrong, you will see the error\nmessage.\n\n If you\u2019ve forgotten to configure ``pmail`` as described above, no\n worries. The application will first guide you through configuration,\n then it will continue with sending the message.\n\nSending e-mails super-fast\n--------------------------\n\nOnce you\u2019re used to ``pmail``, you\u2019ll probably use the super-fast full\ncommand-line mode. You can enter message recipient(s), subject and\neventual attachments as command parameters, in this exact sequence:\n\n::\n\n pmail recipients subject body attachments\n\nThe same rules apply here as with interactive mode:\n\n- Multiple recipients are separated with ``;``\n- To send e-mail to yourself, enter ``me`` or ``self``. No ``this``,\n because ``this`` sucks, just see it for yourself\n https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/this\n- ``\\n`` can be used to add linebreak to message body\n- Message body is optional, press ENTER to send an empty message\n- Attachments are optional, press ENTER to send a message without\n attachments\n- Multiple attachments are separated with ``;``\n\nPartial arguments\n-----------------\n\nYou can provide only some of the input arguments, for example just the\nrecipient or recipient and subject. In this case the application will\nask you only about the remaining arguments. For example:\n\n::\n\n pmail me \n\nwill assume your e-mail address as recipient of the message, and ask you\nabout the message subject and body.\n\nRecommendations\n---------------\n\n- wrap your parameters in quotation marks ``\"\"`` if they contain\n spaces. In interactive mode this is not required.\n- If using multiple addresses or multiple attachments, wrap the whole\n list in quotation marks ``\"\"``. Again, in interactive mode this is\n not required.\n\nSome examples:\n\n::\n\n pmail john.doe@gmail.com Hi Sup?\n pmail john.doe@gmail.com \"Hi, how are you?\" \"Haven't heard from you in a while\\n\\nBob\"\n pmail \"john.doe@gmail.com;mary.doe@gmail.com\" Invitation \"Hi, come over for a pint tomorrow!\"\n pmail mark.spencer@gmail.com \"Do not open\" \"This is a dangerous attachment.\" ~/Docs/Memo.pdf\n pmail john.doe@gmail.com \"3 files\" \"Attached the three documents\" \"1.pdf;2.pdf;3.pdf\"\n\nAdvanced features\n=================\n\nMultiple recipients\n-------------------\n\nTo send a message to multiple recipients, enter multiple e-mail\naddresses separated by semicolon ``;`` like shown below. When in\ncommand-line mode, wrap the addresses in quotation marks ``\"\"``\n\n::\n\n To: hq@google.com;ceo@google.com;cto@google.com\n\n pmail \"hq@google.com;ceo@google.com;cto@google.com\" \"Hello !\" \"Greetings from Bob\"\n\nSpaces and linebreaks\n---------------------\n\nUse ``\\n`` to indicate linebreaks in message body. When in command-line\nmode, wrap text containing spaces in quotation marks ``\"\"``\n\n::\n\n To: john.doe@gmail.com\n Subject: Hi John!\n Body: Hello, what's the story?\\n\\ncheers,\\n\\nSeamus\\nVery Big Corporation Inc.\n\n pmail john.doe@gmail.com \"Hi John!\" \"Hello, what's the story?\\n\\ncheers,\\n\\nSeamus\\nVery Big Corporation Inc.\"\n\nwill result in message body looking like this:\n\n::\n\n Hello, what's the story?\n\n cheers,\n\n Seamus \n Very Big Corporation Inc.\n\nAttachments\n-----------\n\nIf you want to send any attachment, add ``-f`` parameter. In interactive\nmode you\u2019ll be then asked to provide files to attach to the message, for\nexample:\n\n::\n\n To: john.doe@gmail.com\n Subject: Hi John!\n Body: Attached the memo you've requested, cheers!\n Attachments: ~/docs/memo.txt\n\nIn command-line mode simply specify the file path after ``body``\nparameter:\n\n::\n\n pmail john.doe@gmail.com \"Hi John!\" \"Attached the memo you've requested, cheers!\" \"~/docs/memo.txt\"\n\nThe following rules apply:\n\n- If the file is in another directory than the current one, specify\n file path\n- You can use relative file paths, for example ``../docs/file.txt`` or\n subfolder of the current folder ``docs/file.txt``\n- Use ``~`` character to indicate your home folder. Our\n super-intelligent AI engine supports ``~`` even on Windows\n- If you wish to send multiple files, separate them with semicolon\n ``;`` and in command line mode don\u2019t forget to wrap the whole\n parameter in double quotes ``\"\"\"``\n\nAddress book\n============\n\nTo further boost your productivity, ``pmail`` allows defining aliases\nfor frequently used e-mail addresses. Rather than typing:\n\n::\n\n pmail chief.executive.officer@myverybigcorporation.com Hi \"Mayday, mayday, we're sinking!\"\n\nyou\u2019d rather wish to do:\n\n::\n\n pmail ceo Hi \"Mayday, mayday, we're sinking!\"\n\nTwo aliases are predefined and you can use them right away, to send\ne-mails to yourself. Just type ``me`` or ``self``, and e-mail address\nwhich you\u2019ve entered in configuration as yours, will be used as\nrecipient.\n\nTo create your contact book, run p-mail with ``--contacts`` flag:\n\n::\n\n pmail --contacts\n\nThis will list all the existing contacts and ask you to either add new\ncontacts or to delete the existing ones. Then follow the instructions on\nthe screen to fill up your address book.\n\nOnce done, you can use contact names whenever sending e-mails, both in\ninteractive mode as in power mode. You can freely mix contact names and\ne-mail addresses, for example:\n\n::\n\n To: ceo;hr;bob@myverbigcorporation.com\n Subject: Hi\n Body: Everything all right?\n\nor in command-line mode:\n\n::\n\n pmail \"ceo;hr;bob@myverbigcorporation.com\" Hi \"Everything all right?\"\n\n..\n\n Contacts are stored in ~/.pmail/configuration.json file. You can\n easily edit them manually using your preferred text editor which I\n bet is ``nano``.\n\nOther options\n=============\n\nA few other options are available when running ``pmail``:\n\n::\n\n --test Sends test message, the same as when editing configuration\n --version Displays version number and copyright information\n --help Displays quick help and syntax\n --silent If present when sending email in power mode, no output is sent to console\n\nMIT License\n===========\n\nCopyright 2017, Dublin, Tomasz Waraksa\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\u201cSoftware\u201d), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "https://bitbucket.org/tomaszwaraksa/pmail/get/abd3be1798d3.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/tomaszwaraksa/pmail", "keywords": "mail client e-mail email send", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pmail", "package_url": "https://pypi.org/project/pmail/", "platform": "", "project_url": "https://pypi.org/project/pmail/", "project_urls": { "Download": "https://bitbucket.org/tomaszwaraksa/pmail/get/abd3be1798d3.zip", "Homepage": "https://bitbucket.org/tomaszwaraksa/pmail" }, "release_url": "https://pypi.org/project/pmail/1.14/", "requires_dist": [ "keyring" ], "requires_python": ">=3.5", "summary": "Command-line e-mail sender", "version": "1.14" }, "last_serial": 4118207, "releases": { "1.14": [ { "comment_text": "", "digests": { "md5": "ef288e2b1e93a536de7076e3ddf3e5a6", "sha256": "34af0e0e3aeb509e47af43de54e416923c45b05d753e8b22f9cc729baea15db0" }, "downloads": -1, "filename": "pmail-1.14-py3-none-any.whl", "has_sig": false, "md5_digest": "ef288e2b1e93a536de7076e3ddf3e5a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 15486, "upload_time": "2018-07-30T23:05:58", "url": "https://files.pythonhosted.org/packages/d9/f9/6c5e87d448eb0b9b7faeed6d0dc55f8fc916ca557d21899f54a55ee55e20/pmail-1.14-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "394a7c48f564616a8ae526da05673ba6", "sha256": "3158d29022c06e43bcb84af15bff7d6fc74129cf524f39034819b577db4c839b" }, "downloads": -1, "filename": "pmail-1.14.tar.gz", "has_sig": false, "md5_digest": "394a7c48f564616a8ae526da05673ba6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 18780, "upload_time": "2018-07-30T23:05:59", "url": "https://files.pythonhosted.org/packages/25/8c/2cc7d66d125a3cde46032de16348597cea0214cb55af1880e60beb0f0c6a/pmail-1.14.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ef288e2b1e93a536de7076e3ddf3e5a6", "sha256": "34af0e0e3aeb509e47af43de54e416923c45b05d753e8b22f9cc729baea15db0" }, "downloads": -1, "filename": "pmail-1.14-py3-none-any.whl", "has_sig": false, "md5_digest": "ef288e2b1e93a536de7076e3ddf3e5a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 15486, "upload_time": "2018-07-30T23:05:58", "url": "https://files.pythonhosted.org/packages/d9/f9/6c5e87d448eb0b9b7faeed6d0dc55f8fc916ca557d21899f54a55ee55e20/pmail-1.14-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "394a7c48f564616a8ae526da05673ba6", "sha256": "3158d29022c06e43bcb84af15bff7d6fc74129cf524f39034819b577db4c839b" }, "downloads": -1, "filename": "pmail-1.14.tar.gz", "has_sig": false, "md5_digest": "394a7c48f564616a8ae526da05673ba6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.5", "size": 18780, "upload_time": "2018-07-30T23:05:59", "url": "https://files.pythonhosted.org/packages/25/8c/2cc7d66d125a3cde46032de16348597cea0214cb55af1880e60beb0f0c6a/pmail-1.14.tar.gz" } ] }