Metadata-Version: 2.1
Name: mailgun2
Version: 1.1.1
Summary: A python client for Mailgun API v2
Home-page: https://github.com/albertyw/python-mailgun2
Author: Albert Wang
Author-email: git@albertyw.com
License: Apache
Keywords: mailgun,email
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Telecommunications Industry
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.4
Classifier: Topic :: Communications :: Email
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: requests (<3.0,>=2.6)
Provides-Extra: dev
Provides-Extra: test

python-mailgun2
===============

|PyPI|
|Python Version|

|Codeship Status for albertyw/python-mailgun2|
|Code Climate|
|Code Climate Test Coverage|
|Dependency Status|

Originally at https://github.com/ZeroCater/python-mailgun2

A super simple Python API for interacting with
`Mailgun <http://www.mailgun.com/>`__. Currently only supports sending
messages. Powered by
`Requests <http://docs.python-requests.org/en/latest/>`__.

Works with Python 3!

Installation
------------

.. code:: shell

    pip install mailgun2

Usage
-----

.. code:: python

    from mailgun2 import Mailgun
    mailer = Mailgun('example.mailgun.org', 'public_key', 'private_key')
    mailer.send_message(
        'from@yourdomain.com',
        ['to@you.com', 'others@you.com'],
        subject='Hi!',
        text='Sweet.'
        )

Required arguments:

::

    from_email: string of email address to set as sender
    to: list or string of email address to send to

Optional arguments:

::

    subject: string subject of the email
    text: string body of the email. Either text or html is required.
    html: string HTML of the email. Either text or html is required.
    cc: list of cc addresses.
    bcc: list of bcc addresses.
    tags: list of mailgun tags to associate with the email.
    reply_to: Convenience argument for setting the Reply-To header
    headers: Extra headers for messages
    inlines: List of file paths to attach inline to the message
    attachments: List of (file name, content type, file handle) as a multipart attachment


Contributing
------------
See `Contributing <https://github.com/albertyw/python-mailgun2/blob/master/CONTRIBUTING.rst>`__

Pull requests welcome!

Distributing
------------

.. code:: bash

    pip install twine
    python setup.py sdist bdist_wheel
    twine upload dist/*


.. |PyPI| image:: https://img.shields.io/pypi/v/mailgun2.svg
   :target: https://github.com/albertyw/python-mailgun2
.. |Python Version| image:: https://img.shields.io/pypi/pyversions/mailgun2.svg
.. |Codeship Status for albertyw/python-mailgun2| image:: https://codeship.com/projects/ce6c4f80-c4de-0133-efb5-62b97b21679d/status?branch=master
   :target: https://codeship.com/projects/138455
.. |Code Climate| image:: https://codeclimate.com/github/albertyw/python-mailgun2/badges/gpa.svg
   :target: https://codeclimate.com/github/albertyw/python-mailgun2
.. |Code Climate Test Coverage| image:: https://codeclimate.com/github/albertyw/python-mailgun2/badges/coverage.svg
   :target: https://codeclimate.com/github/albertyw/python-mailgun2/coverage
.. |Dependency Status| image:: https://pyup.io/repos/github/albertyw/python-mailgun2/shield.svg
   :target: https://pyup.io/repos/github/albertyw/python-mailgun2/


