outgoing-mailgun


Nameoutgoing-mailgun JSON
Version 0.3.1 PyPI version JSON
download
home_pageNone
Summaryoutgoing extension for Mailgun
upload_time2024-12-01 12:55:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT
keywords mailgun e-mail email outgoing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            |repostatus| |ci-status| |coverage| |pyversions| |license|

.. |repostatus| image:: https://www.repostatus.org/badges/latest/active.svg
    :target: https://www.repostatus.org/#active
    :alt: Project Status: Active — The project has reached a stable, usable
          state and is being actively developed.

.. |ci-status| image:: https://github.com/jwodder/outgoing-mailgun/actions/workflows/test.yml/badge.svg
    :target: https://github.com/jwodder/outgoing-mailgun/actions/workflows/test.yml
    :alt: CI Status

.. |coverage| image:: https://codecov.io/gh/jwodder/outgoing-mailgun/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/jwodder/outgoing-mailgun

.. |pyversions| image:: https://img.shields.io/pypi/pyversions/outgoing-mailgun.svg
    :target: https://pypi.org/project/outgoing-mailgun/

.. |license| image:: https://img.shields.io/github/license/jwodder/outgoing-mailgun.svg
    :target: https://opensource.org/licenses/MIT
    :alt: MIT License

`GitHub <https://github.com/jwodder/outgoing-mailgun>`_
| `PyPI <https://pypi.org/project/outgoing-mailgun/>`_
| `Issues <https://github.com/jwodder/outgoing-mailgun/issues>`_
| `Changelog <https://github.com/jwodder/outgoing-mailgun/blob/master/CHANGELOG.md>`_

``outgoing-mailgun`` is an extension for outgoing_ that adds the ability to
send e-mails via Mailgun_.  Simply install ``outgoing-mailgun`` alongside
``outgoing``, and you'll be able to specify "mailgun" as a sending method in
your ``outgoing`` configuration.

.. _outgoing: https://github.com/jwodder/outgoing
.. _Mailgun: https://www.mailgun.com

Installation
============
``outgoing-mailgun`` requires Python 3.8 or higher.  Just use `pip
<https://pip.pypa.io>`_ for Python 3 (You have pip, right?) to install
``outgoing-mailgun`` and its dependencies (including ``outgoing``)::

    python3 -m pip install outgoing-mailgun


Configuration
=============

When using "mailgun" as the sending method in an ``outgoing`` configuration,
the following configuration fields are recognized:

``base-url`` : HTTP URL (optional)
    The base URL to use for Mailgun API requests.  This should be either
    ``"https://api.mailgun.net"`` (the default) for domains in Mailgun's US
    region or ``"https://api.eu.mailgun.net"`` for domains in Mailgun's EU
    region.  Trailing slashes on the URL are optional.

``domain`` : string (required)
    The domain name you registered with Mailgun for sending e-mail

``api-key`` : password (required)
    A Mailgun API key for your domain; see |the outgoing documentation on
    passwords|_ for ways to write this field.

    .. |the outgoing documentation on passwords|
       replace:: the ``outgoing`` documentation on passwords
    .. _the outgoing documentation on passwords:
       https://outgoing.readthedocs.io/en/latest/configuration.html#passwords

    When using the ``keyring`` password scheme or another scheme that takes
    optional host/service and username fields, if the service and/or username
    is not supplied in the password specifier, then the service defaults to the
    domain name of the ``base-url`` field, and the username defaults to the
    value of the ``domain`` field.

``tags`` : list of strings (optional)
    A set of tags to apply to sent e-mails

``deliverytime`` : datetime (optional)
    Desired time of delivery for sent e-mails; if no timezone offset is given,
    it is assumed to be in the local system timezone

``dkim`` : boolean (optional)
    Enable/disable DKIM signatures on sent e-mails

``testmode`` : boolean (optional)
    Whether to send in `test mode`_

    .. _test mode: https://documentation.mailgun.com/en/latest/user_manual.html
                   #sending-in-test-mode

``tracking`` : boolean (optional)
    Whether to enable `message tracking`_

    .. _message tracking: https://documentation.mailgun.com/en/latest
                          /user_manual.html#tracking-messages

``tracking-clicks`` : boolean or ``"htmlonly"`` (optional)
    Whether to enable clicks tracking in e-mails

``tracking-opens`` : boolean (optional)
    Whether to enable opens tracking in e-mails

``headers`` : table with string values (optional)
    A collection of custom MIME headers to append to sent e-mails

``variables`` : table with string values (optional)
    A collection of `Mailgun variables`_ to attach to sent e-mails

    .. _Mailgun variables: https://documentation.mailgun.com/en/latest
                           /user_manual.html#attaching-data-to-messages


Example Configuration
=====================

.. code:: toml

    [outgoing]
    method = "mailgun"
    domain = "mydomain.nil"
    api-key = { file = "~/secrets/mailgun.key" }
    dkim = true
    tags = [ "sent-with-outgoing", "my-campaign" ]
    tracking-clicks = "htmlonly"
    headers = { Reply-To = "me@mydomain.nil" }
    variables = { sender = "outgoing", foo = "bar" }


Sender-Specific Behavior
========================

The ``MailgunSender`` class provided by this extension is a reentrant__ and
reusable__ context manager, and its ``send()`` method can be called outside of
a context.  In addition, on success, the ``send()`` method returns the message
ID of the newly-sent e-mail (without enclosing angle brackets).

__ https://docs.python.org/3/library/contextlib.html#reentrant-context-managers
__ https://docs.python.org/3/library/contextlib.html#reusable-context-managers

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "outgoing-mailgun",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Mailgun, e-mail, email, outgoing",
    "author": null,
    "author_email": "John Thorvald Wodder II <outgoing-mailgun@varonathe.org>",
    "download_url": "https://files.pythonhosted.org/packages/05/ad/359920eaa0ef227a652d478add6f66f5a7b6475b21c39b47153c408e6e5b/outgoing_mailgun-0.3.1.tar.gz",
    "platform": null,
    "description": "|repostatus| |ci-status| |coverage| |pyversions| |license|\n\n.. |repostatus| image:: https://www.repostatus.org/badges/latest/active.svg\n    :target: https://www.repostatus.org/#active\n    :alt: Project Status: Active \u2014 The project has reached a stable, usable\n          state and is being actively developed.\n\n.. |ci-status| image:: https://github.com/jwodder/outgoing-mailgun/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/jwodder/outgoing-mailgun/actions/workflows/test.yml\n    :alt: CI Status\n\n.. |coverage| image:: https://codecov.io/gh/jwodder/outgoing-mailgun/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/jwodder/outgoing-mailgun\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/outgoing-mailgun.svg\n    :target: https://pypi.org/project/outgoing-mailgun/\n\n.. |license| image:: https://img.shields.io/github/license/jwodder/outgoing-mailgun.svg\n    :target: https://opensource.org/licenses/MIT\n    :alt: MIT License\n\n`GitHub <https://github.com/jwodder/outgoing-mailgun>`_\n| `PyPI <https://pypi.org/project/outgoing-mailgun/>`_\n| `Issues <https://github.com/jwodder/outgoing-mailgun/issues>`_\n| `Changelog <https://github.com/jwodder/outgoing-mailgun/blob/master/CHANGELOG.md>`_\n\n``outgoing-mailgun`` is an extension for outgoing_ that adds the ability to\nsend e-mails via Mailgun_.  Simply install ``outgoing-mailgun`` alongside\n``outgoing``, and you'll be able to specify \"mailgun\" as a sending method in\nyour ``outgoing`` configuration.\n\n.. _outgoing: https://github.com/jwodder/outgoing\n.. _Mailgun: https://www.mailgun.com\n\nInstallation\n============\n``outgoing-mailgun`` requires Python 3.8 or higher.  Just use `pip\n<https://pip.pypa.io>`_ for Python 3 (You have pip, right?) to install\n``outgoing-mailgun`` and its dependencies (including ``outgoing``)::\n\n    python3 -m pip install outgoing-mailgun\n\n\nConfiguration\n=============\n\nWhen using \"mailgun\" as the sending method in an ``outgoing`` configuration,\nthe following configuration fields are recognized:\n\n``base-url`` : HTTP URL (optional)\n    The base URL to use for Mailgun API requests.  This should be either\n    ``\"https://api.mailgun.net\"`` (the default) for domains in Mailgun's US\n    region or ``\"https://api.eu.mailgun.net\"`` for domains in Mailgun's EU\n    region.  Trailing slashes on the URL are optional.\n\n``domain`` : string (required)\n    The domain name you registered with Mailgun for sending e-mail\n\n``api-key`` : password (required)\n    A Mailgun API key for your domain; see |the outgoing documentation on\n    passwords|_ for ways to write this field.\n\n    .. |the outgoing documentation on passwords|\n       replace:: the ``outgoing`` documentation on passwords\n    .. _the outgoing documentation on passwords:\n       https://outgoing.readthedocs.io/en/latest/configuration.html#passwords\n\n    When using the ``keyring`` password scheme or another scheme that takes\n    optional host/service and username fields, if the service and/or username\n    is not supplied in the password specifier, then the service defaults to the\n    domain name of the ``base-url`` field, and the username defaults to the\n    value of the ``domain`` field.\n\n``tags`` : list of strings (optional)\n    A set of tags to apply to sent e-mails\n\n``deliverytime`` : datetime (optional)\n    Desired time of delivery for sent e-mails; if no timezone offset is given,\n    it is assumed to be in the local system timezone\n\n``dkim`` : boolean (optional)\n    Enable/disable DKIM signatures on sent e-mails\n\n``testmode`` : boolean (optional)\n    Whether to send in `test mode`_\n\n    .. _test mode: https://documentation.mailgun.com/en/latest/user_manual.html\n                   #sending-in-test-mode\n\n``tracking`` : boolean (optional)\n    Whether to enable `message tracking`_\n\n    .. _message tracking: https://documentation.mailgun.com/en/latest\n                          /user_manual.html#tracking-messages\n\n``tracking-clicks`` : boolean or ``\"htmlonly\"`` (optional)\n    Whether to enable clicks tracking in e-mails\n\n``tracking-opens`` : boolean (optional)\n    Whether to enable opens tracking in e-mails\n\n``headers`` : table with string values (optional)\n    A collection of custom MIME headers to append to sent e-mails\n\n``variables`` : table with string values (optional)\n    A collection of `Mailgun variables`_ to attach to sent e-mails\n\n    .. _Mailgun variables: https://documentation.mailgun.com/en/latest\n                           /user_manual.html#attaching-data-to-messages\n\n\nExample Configuration\n=====================\n\n.. code:: toml\n\n    [outgoing]\n    method = \"mailgun\"\n    domain = \"mydomain.nil\"\n    api-key = { file = \"~/secrets/mailgun.key\" }\n    dkim = true\n    tags = [ \"sent-with-outgoing\", \"my-campaign\" ]\n    tracking-clicks = \"htmlonly\"\n    headers = { Reply-To = \"me@mydomain.nil\" }\n    variables = { sender = \"outgoing\", foo = \"bar\" }\n\n\nSender-Specific Behavior\n========================\n\nThe ``MailgunSender`` class provided by this extension is a reentrant__ and\nreusable__ context manager, and its ``send()`` method can be called outside of\na context.  In addition, on success, the ``send()`` method returns the message\nID of the newly-sent e-mail (without enclosing angle brackets).\n\n__ https://docs.python.org/3/library/contextlib.html#reentrant-context-managers\n__ https://docs.python.org/3/library/contextlib.html#reusable-context-managers\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "outgoing extension for Mailgun",
    "version": "0.3.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/jwodder/outgoing-mailgun/issues",
        "Source Code": "https://github.com/jwodder/outgoing-mailgun"
    },
    "split_keywords": [
        "mailgun",
        " e-mail",
        " email",
        " outgoing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3a48d2a1c63865c336fceb865a24e74e7e379fa5693cb19491d0a67125b19412",
                "md5": "8e5997949ae334c30d2105be24206448",
                "sha256": "4406627bb2fb51733372dcdd811062aa6944748c44ac1ed6db04aafb4eba330a"
            },
            "downloads": -1,
            "filename": "outgoing_mailgun-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8e5997949ae334c30d2105be24206448",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 6289,
            "upload_time": "2024-12-01T12:54:58",
            "upload_time_iso_8601": "2024-12-01T12:54:58.184564Z",
            "url": "https://files.pythonhosted.org/packages/3a/48/d2a1c63865c336fceb865a24e74e7e379fa5693cb19491d0a67125b19412/outgoing_mailgun-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "05ad359920eaa0ef227a652d478add6f66f5a7b6475b21c39b47153c408e6e5b",
                "md5": "2e7699ba12832cc4d0d35c9be4554efa",
                "sha256": "41b1a1c1f94336294aa32ad96aafc5ada2c972daac2a23ed8d4ec2aa4d06d1f2"
            },
            "downloads": -1,
            "filename": "outgoing_mailgun-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "2e7699ba12832cc4d0d35c9be4554efa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 9368,
            "upload_time": "2024-12-01T12:55:04",
            "upload_time_iso_8601": "2024-12-01T12:55:04.994548Z",
            "url": "https://files.pythonhosted.org/packages/05/ad/359920eaa0ef227a652d478add6f66f5a7b6475b21c39b47153c408e6e5b/outgoing_mailgun-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-12-01 12:55:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jwodder",
    "github_project": "outgoing-mailgun",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "outgoing-mailgun"
}
        
Elapsed time: 0.41936s