outgoing


Nameoutgoing JSON
Version 0.6.2 PyPI version JSON
download
home_pageNone
SummaryCommon interface for multiple e-mail methods
upload_time2025-08-02 14:23:31
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords e-mail email mailbox mbox send mail sendmail smtp
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/actions/workflows/test.yml/badge.svg
    :target: https://github.com/jwodder/outgoing/actions/workflows/test.yml
    :alt: CI Status

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

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

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

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

``outgoing`` provides a common interface to multiple different e-mail sending
methods (SMTP, sendmail, mbox, etc.).  Just construct a sender from a
configuration file or object, pass it an ``EmailMessage`` instance, and let the
magical internet daemons take care of the rest.

``outgoing`` itself provides support for only basic sending methods; additional
methods are provided by extension packages.

See `the documentation <https://outgoing.readthedocs.io>`_ for more
information.


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

    python3 -m pip install outgoing


Examples
========

A sample configuration file:

.. code:: toml

    [outgoing]
    method = "smtp"
    host = "mx.example.com"
    ssl = "starttls"
    username = "myname"
    password = { file = "~/secrets/smtp-password" }


Sending an e-mail based on a configuration file:

.. code:: python

    from email.message import EmailMessage
    import outgoing

    # Construct an EmailMessage object the standard Python way:
    msg = EmailMessage()
    msg["Subject"] = "Meet me"
    msg["To"] = "my.beloved@love.love"
    msg["From"] = "me@here.qq"
    msg.set_content(
        "Oh my beloved!\n"
        "\n"
        "Wilt thou dine with me on the morrow?\n"
        "\n"
        "We're having hot pockets.\n"
        "\n"
        "Love, Me\n"
    )

    # Construct a sender object based on the default config file (assuming it's
    # populated)
    with outgoing.from_config_file() as sender:
        # Now send that letter!
        sender.send(msg)


As an alternative to using a configuration file, you can specify an explicit
configuration by passing the configuration structure to the
``outgoing.from_dict()`` method, like so:

.. code:: python

    from email.message import EmailMessage
    import outgoing

    # Construct an EmailMessage object using the eletter library
    # <https://github.com/jwodder/eletter>:
    from eletter import compose

    msg1 = compose(
        subject="No.",
        to=["me@here.qq"],
        from_="my.beloved@love.love",
        text=(
            "Hot pockets?  Thou disgusteth me.\n"
            "\n"
            "Pineapple pizza or RIOT.\n"
        ),
    )

    msg2 = compose(
        subject="I'd like to place an order.",
        to=["pete@za.aa"],
        from_="my.beloved@love.love",
        text="I need the usual.  Twelve Hawaiian Abominations to go, please.\n",
    )

    SENDING_CONFIG = {
        "method": "smtp",
        "host": "smtp.love.love",
        "username": "my.beloved",
        "password": {"env": "SMTP_PASSWORD"},
        "ssl": "starttls",
    }

    with outgoing.from_dict(SENDING_CONFIG) as sender:
        sender.send(msg1)
        sender.send(msg2)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "outgoing",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "e-mail, email, mailbox, mbox, send mail, sendmail, smtp",
    "author": null,
    "author_email": "John Thorvald Wodder II <outgoing@varonathe.org>",
    "download_url": "https://files.pythonhosted.org/packages/bb/03/be35b306f64abbfe2d184aab08c647a14efe25f037ff7d2586b92e579069/outgoing-0.6.2.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/actions/workflows/test.yml/badge.svg\n    :target: https://github.com/jwodder/outgoing/actions/workflows/test.yml\n    :alt: CI Status\n\n.. |coverage| image:: https://codecov.io/gh/jwodder/outgoing/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/jwodder/outgoing\n\n.. |pyversions| image:: https://img.shields.io/pypi/pyversions/outgoing.svg\n    :target: https://pypi.org/project/outgoing/\n\n.. |license| image:: https://img.shields.io/github/license/jwodder/outgoing.svg\n    :target: https://opensource.org/licenses/MIT\n    :alt: MIT License\n\n`GitHub <https://github.com/jwodder/outgoing>`_\n| `PyPI <https://pypi.org/project/outgoing/>`_\n| `Documentation <https://outgoing.readthedocs.io>`_\n| `Issues <https://github.com/jwodder/outgoing/issues>`_\n| `Changelog <https://github.com/jwodder/outgoing/blob/master/CHANGELOG.md>`_\n\n``outgoing`` provides a common interface to multiple different e-mail sending\nmethods (SMTP, sendmail, mbox, etc.).  Just construct a sender from a\nconfiguration file or object, pass it an ``EmailMessage`` instance, and let the\nmagical internet daemons take care of the rest.\n\n``outgoing`` itself provides support for only basic sending methods; additional\nmethods are provided by extension packages.\n\nSee `the documentation <https://outgoing.readthedocs.io>`_ for more\ninformation.\n\n\nInstallation\n============\n``outgoing`` 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`` and its dependencies::\n\n    python3 -m pip install outgoing\n\n\nExamples\n========\n\nA sample configuration file:\n\n.. code:: toml\n\n    [outgoing]\n    method = \"smtp\"\n    host = \"mx.example.com\"\n    ssl = \"starttls\"\n    username = \"myname\"\n    password = { file = \"~/secrets/smtp-password\" }\n\n\nSending an e-mail based on a configuration file:\n\n.. code:: python\n\n    from email.message import EmailMessage\n    import outgoing\n\n    # Construct an EmailMessage object the standard Python way:\n    msg = EmailMessage()\n    msg[\"Subject\"] = \"Meet me\"\n    msg[\"To\"] = \"my.beloved@love.love\"\n    msg[\"From\"] = \"me@here.qq\"\n    msg.set_content(\n        \"Oh my beloved!\\n\"\n        \"\\n\"\n        \"Wilt thou dine with me on the morrow?\\n\"\n        \"\\n\"\n        \"We're having hot pockets.\\n\"\n        \"\\n\"\n        \"Love, Me\\n\"\n    )\n\n    # Construct a sender object based on the default config file (assuming it's\n    # populated)\n    with outgoing.from_config_file() as sender:\n        # Now send that letter!\n        sender.send(msg)\n\n\nAs an alternative to using a configuration file, you can specify an explicit\nconfiguration by passing the configuration structure to the\n``outgoing.from_dict()`` method, like so:\n\n.. code:: python\n\n    from email.message import EmailMessage\n    import outgoing\n\n    # Construct an EmailMessage object using the eletter library\n    # <https://github.com/jwodder/eletter>:\n    from eletter import compose\n\n    msg1 = compose(\n        subject=\"No.\",\n        to=[\"me@here.qq\"],\n        from_=\"my.beloved@love.love\",\n        text=(\n            \"Hot pockets?  Thou disgusteth me.\\n\"\n            \"\\n\"\n            \"Pineapple pizza or RIOT.\\n\"\n        ),\n    )\n\n    msg2 = compose(\n        subject=\"I'd like to place an order.\",\n        to=[\"pete@za.aa\"],\n        from_=\"my.beloved@love.love\",\n        text=\"I need the usual.  Twelve Hawaiian Abominations to go, please.\\n\",\n    )\n\n    SENDING_CONFIG = {\n        \"method\": \"smtp\",\n        \"host\": \"smtp.love.love\",\n        \"username\": \"my.beloved\",\n        \"password\": {\"env\": \"SMTP_PASSWORD\"},\n        \"ssl\": \"starttls\",\n    }\n\n    with outgoing.from_dict(SENDING_CONFIG) as sender:\n        sender.send(msg1)\n        sender.send(msg2)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Common interface for multiple e-mail methods",
    "version": "0.6.2",
    "project_urls": {
        "Bug Tracker": "https://github.com/jwodder/outgoing/issues",
        "Documentation": "https://outgoing.readthedocs.io",
        "Source Code": "https://github.com/jwodder/outgoing"
    },
    "split_keywords": [
        "e-mail",
        " email",
        " mailbox",
        " mbox",
        " send mail",
        " sendmail",
        " smtp"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aa2a289733d420a9407a2dba3017b78d9a2d9d5176b6c1a49c78f67f370b8451",
                "md5": "5ef9b52835eb1fd8529a2b7a1d136405",
                "sha256": "63a95e3ec0d0aafe57e8e8378f22e88d7982a12c57406ef1705a2580f42668bb"
            },
            "downloads": -1,
            "filename": "outgoing-0.6.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5ef9b52835eb1fd8529a2b7a1d136405",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 19434,
            "upload_time": "2025-08-02T14:23:30",
            "upload_time_iso_8601": "2025-08-02T14:23:30.456050Z",
            "url": "https://files.pythonhosted.org/packages/aa/2a/289733d420a9407a2dba3017b78d9a2d9d5176b6c1a49c78f67f370b8451/outgoing-0.6.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "bb03be35b306f64abbfe2d184aab08c647a14efe25f037ff7d2586b92e579069",
                "md5": "32f435f0aaabc97334b74ab55515f635",
                "sha256": "35a1ef5b054d8db527f1807eb2292029166d6d9d0d930eb17509c4fa5b82c966"
            },
            "downloads": -1,
            "filename": "outgoing-0.6.2.tar.gz",
            "has_sig": false,
            "md5_digest": "32f435f0aaabc97334b74ab55515f635",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 34583,
            "upload_time": "2025-08-02T14:23:31",
            "upload_time_iso_8601": "2025-08-02T14:23:31.698526Z",
            "url": "https://files.pythonhosted.org/packages/bb/03/be35b306f64abbfe2d184aab08c647a14efe25f037ff7d2586b92e579069/outgoing-0.6.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-02 14:23:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jwodder",
    "github_project": "outgoing",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "outgoing"
}
        
Elapsed time: 2.49312s