Description
-----------

This is a very simple package that enables you to send mail through
gmail using python. It’s not a big deal, it does not read your emails,
no calendars, no drafts… It does just one thing, sending emails (possibly with attachments).

Requirements
------------

-  Python 3
-  pip3 for installation

Install
-------

Using ``setup.py``
~~~~~~~~~~~~~~~~~~

::

    git clone https://github.com/kindlychung/pygmail.git
    cd pygmail
    python3 setup.py install


Using pip:
~~~~~~~~~~

From github:

::

    pip3 install --upgrade git+https://github.com/kindlychung/pygmail.git

or from PyPI:

::

    pip3 install --upgrade pygmail2


Security
--------

It uses smtp, that’s all. You can always check the source code, of
course

Usage
-----

::

    from pygmail2.Pygmail import mo
    from pygmail2.Addr import ad
    # send to one address
    mo.send(to_addr = "xyz@example.com", subject= "test", text = "<b>hi there</b>")
    # send attachments
    mo.send(to_addr = "xyz@example.com", subject= "test", text = "<b>hi there</b>", attachments = ["/tmp/x.txt", "/tmp/y.png"])
    # send to multiple addresses
    mo.send(to_addr = ["xyz@example.com", "aaa@bbb.org"], subject= "test", text = "<b>hi there</b>", attachments = ["/tmp/x.txt", "/tmp/y.png"])





Change log
----------

- single recipient and single attachment now don't require using list
- Enabled attachments
- Email address autocompletion

