Metadata-Version: 2.1
Name: quick-mail
Version: 1.0.2
Summary: A simple commandline application for sending mails quickly
Home-page: https://github.com/avikumar15/quick-email-cli
Author: Avi Kumar Singh
Author-email: avikumar.singh1508@gmail.com
License: MIT
Keywords: CLI,gmail,email
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Topic :: Education
Classifier: Topic :: Communications
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Internet
Classifier: Topic :: Terminals
Classifier: License :: OSI Approved :: MIT License
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Other Audience
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.0
Description-Content-Type: text/markdown
Requires-Dist: AccessControl (>=5.0)
Requires-Dist: Acquisition (>=4.7)
Requires-Dist: AuthEncoding (>=4.2)
Requires-Dist: beautifulsoup4 (>=4.9.3)
Requires-Dist: BTrees (>=4.7.2)
Requires-Dist: cachetools (>=4.1.1)
Requires-Dist: certifi (>=2020.11.8)
Requires-Dist: cffi (>=1.14.4)
Requires-Dist: Chameleon (>=3.8.1)
Requires-Dist: chardet (==3.0.4)
Requires-Dist: DateTime (>=4.3)
Requires-Dist: DocumentTemplate (>=4.0)
Requires-Dist: ExtensionClass (>=4.5.0)
Requires-Dist: google-api-core (>=1.25.0)
Requires-Dist: google-api-python-client (>=1.12.8)
Requires-Dist: google-auth (>=1.23.0)
Requires-Dist: google-auth-httplib2 (>=0.0.4)
Requires-Dist: google-auth-oauthlib (>=0.4.2)
Requires-Dist: googleapis-common-protos (>=1.52.0)
Requires-Dist: httplib2 (>=0.19.0)
Requires-Dist: idna (>=2.10)
Requires-Dist: MultiMapping (>=4.1)
Requires-Dist: oauthlib (>=3.1.0)
Requires-Dist: PasteDeploy (>=2.1.1)
Requires-Dist: Persistence (>=3.0)
Requires-Dist: persistent (>=4.6.4)
Requires-Dist: protobuf (>=3.14.0)
Requires-Dist: pyasn1 (>=0.4.8)
Requires-Dist: pyasn1-modules (>=0.2.8)
Requires-Dist: pycparser (>=2.20)
Requires-Dist: python-gettext (>=4.0)
Requires-Dist: pytz (>=2020.4)
Requires-Dist: requests (>=2.25.0)
Requires-Dist: requests-oauthlib (>=1.3.0)
Requires-Dist: RestrictedPython (>=5.1)
Requires-Dist: roman (>=3.3)
Requires-Dist: rsa (>=4.6)
Requires-Dist: six (>=1.15.0)
Requires-Dist: soupsieve (>=2.0.1)
Requires-Dist: transaction (>=3.0.0)
Requires-Dist: uritemplate (>=3.0.1)
Requires-Dist: urllib3 (==1.26.2)
Requires-Dist: waitress (>=1.4.4)
Requires-Dist: WebOb (>=1.8.6)
Requires-Dist: WebTest (>=2.0.35)
Requires-Dist: WSGIProxy2 (>=0.4.6)
Requires-Dist: z3c.pt (>=3.3.0)
Requires-Dist: zc.lockfile (>=2.0)
Requires-Dist: ZConfig (>=3.5.0)
Requires-Dist: zExceptions (>=4.1)
Requires-Dist: ZODB (>=5.6.0)
Requires-Dist: zodbpickle (>=2.0.0)
Requires-Dist: zope.annotation (>=4.7.0)
Requires-Dist: zope.browser (>=2.3)
Requires-Dist: zope.browsermenu (>=4.4)
Requires-Dist: zope.browserpage (>=4.4.0)
Requires-Dist: zope.browserresource (>=4.4)
Requires-Dist: zope.cachedescriptors (>=4.3.1)
Requires-Dist: zope.component (>=4.6.2)
Requires-Dist: zope.configuration (>=4.4.0)
Requires-Dist: zope.container (>=4.4.0)
Requires-Dist: zope.contentprovider (>=4.2.1)
Requires-Dist: zope.contenttype (>=4.5.0)
Requires-Dist: zope.deferredimport (>=4.3.1)
Requires-Dist: zope.deprecation (>=4.4.0)
Requires-Dist: zope.dottedname (>=4.3)
Requires-Dist: zope.event (>=4.5.0)
Requires-Dist: zope.exceptions (>=4.4)
Requires-Dist: zope.filerepresentation (>=5.0.0)
Requires-Dist: zope.globalrequest (>=1.5)
Requires-Dist: zope.hookable (>=5.0.1)
Requires-Dist: zope.i18n (>=4.7.0)
Requires-Dist: zope.i18nmessageid (>=5.0.1)
Requires-Dist: zope.interface (>=5.2.0)
Requires-Dist: zope.lifecycleevent (>=4.3)
Requires-Dist: zope.location (>=4.2)
Requires-Dist: zope.pagetemplate (>=4.5.0)
Requires-Dist: zope.processlifetime (>=2.3.0)
Requires-Dist: zope.proxy (>=4.3.5)
Requires-Dist: zope.ptresource (>=4.2.0)
Requires-Dist: zope.publisher (>=5.2.1)
Requires-Dist: zope.schema (>=6.0.0)
Requires-Dist: zope.security (>=5.1.1)
Requires-Dist: zope.sequencesort (>=4.1.2)
Requires-Dist: zope.site (>=4.4.0)
Requires-Dist: zope.size (>=4.3)
Requires-Dist: zope.structuredtext (>=4.3)
Requires-Dist: zope.tal (>=4.4)
Requires-Dist: zope.tales (>=5.1)
Requires-Dist: zope.testbrowser (>=5.5.1)
Requires-Dist: zope.testing (>=4.7)
Requires-Dist: zope.traversing (>=4.4.1)
Requires-Dist: zope.viewlet (>=4.2.1)

Quick Mail CLI
=================

A command line interface to send mail without any hassle.

## Why this tool?

Sending last minute mails using conventional tools can get annoying and tiresome. This CLI helps in such situation since it makes sending mail hassle-free and very quick. Use this tool to send mails quickly without leaving your terminal.

## Installation

Install quick-mail from the Python Package Index (PyPi)

    $ pip install quick-mail

Or manually from this repository.

```
$ git clone https://github.com/avikumar15/quick-mail-cli

* add line export PYTHONPATH=/path/to/project/quick-email-cli to ~/.bashrc *

$ cd quick-mail-cli/

* activate virtual environment *

$ pip install -r requirements.txt
$ pip install .
```

Check installation by running


```
$ quickmail --version
```

## Usage


To use this:

	$ quickmail --help

<h3></h3>

```
usage: quickmail [-h] [-v] {clear,init,send,template} ...

A command line interface to send mail without any hassle

positional arguments:
  {clear,init,send,template}
    clear               clear the body of message from local or even the token if
                        --justdoit argument is added
    init                initialise token and set your email id
    send                send the mail
    template            manage templates of mail body

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         print current cli version

```


Create your [OAuth client ID](https://console.developers.google.com/apis/credentials/) and select app type as Desktop App and download the credentials.json file.
<h2></h2>

Then run the init command to authenticate gmail, and generate token. This command is required to be run only once.

```
$ quickmail init <path/to/credentials.json>
```

Now you are all set. Use the send command to send mail.


	$ quickmail send --help

<h3></h3>

```
usage: quickmail send [-h] -r RECEIVER -sub SUBJECT [-t TEMPLATE] [-b BODY]
                      [-a ATTACHMENT] [-l]

Use the send command to send mail. Body can be passed as an argument, or typed in
a nano shell. Use optional --lessgo command for sending mail without confirmation

optional arguments:
  -h, --help            show this help message and exit
  -r RECEIVER, --receiver RECEIVER
                        receiver's email address, eg. '-r "xyz@gmail.com"'
  -sub SUBJECT, --subject SUBJECT
                        email's subject, eg. '-sub "XYZ submission"'
  -t TEMPLATE, --template TEMPLATE
                        template of email body, eg. '-t="assignment_template"'
  -b BODY, --body BODY  email's body, eg. '-b "Message Body Comes Here"'
  -a ATTACHMENT, --attachment ATTACHMENT
                        email's attachment path, eg. '~/Desktop/XYZ_Endsem.pdf'
  -l, --lessgo          skip confirmation before sending mail

```

Body and attachments are optional arguments. Body can be either passed as an argument otherwise it can also be typed in the nano shell (Use -t argument to use a template body). Use the --lessgo (shorthand -l) to skip confirmation of mail, for quicker mail deliveries.

To clear the cli storage, use the clear command. Use --justdoit (shorthand -j) to even remove the credential and token files from project directory, this extra argument would allow you to change your primary email address.


	$ quickmail clear --help

<h3></h3>

```
usage: quickmail clear [-h] [-j]

Use the clear command to clear all email body that are saved in your home
directories. Additionally, pass --justdoit to remove the credential files as well

optional arguments:
  -h, --help      show this help message and exit
  -j, --justdoit  clear storage including the credentials and token

```

To manage templates use the template command.

	$ quickmail template --help

<h3></h3>

```
usage: quickmail template [-h] {add,listall,edit} ...

manage mail templates

positional arguments:
  {add,listall,edit}
    add               add a new template
    listall           list all templates
    edit              edit a particular template

optional arguments:
  -h, --help          show this help message and exit

```

Following is a recording of the terminal session which records the usage of `quickmail` from init command till send command. 

<h3></h3>

[![asciicast](https://asciinema.org/a/78mPkSTa0rTK3TXhnkgRDP6RO.svg)](https://asciinema.org/a/78mPkSTa0rTK3TXhnkgRDP6RO)

### Improvements and Bugs

Found any bugs? Or have any suggestions, feel free to open an issue.



