RelayMe


NameRelayMe JSON
Version 0.0.8 PyPI version JSON
download
home_page
SummarySends emails with chosen email relay service
upload_time2023-07-23 16:03:15
maintainer
docs_urlNone
authorElijah Phifer
requires_python
licenseMIT
keywords mail email relay relayservice
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            RelayMe
=======

0.0.8
-----

This module is geared towards emailing using email relay services.

Prerequisites
-------------

First, to install RelayMe, open your command prompt and run the following command:

.. code-block:: shell

   pip install RelayMe

Second, this module requires a `SenderConfig` instance to be created in your code, which can be passed into the function that sends emails.

The `SenderConfig` instance needs a config file key to be passed in, which should contain the following keys:

- `server`
- `port`
- `sender`
- `username`
- `password`
- `subject`
- `header`
- `footer`

(Case doesn't matter, but spelling is important. The keys could also be named 'Server', 'PORT', 'UserName', etc.)

(The order doesn't matter either. The keys can be in any order you like.)

(Also the 'username' and 'password' keys are optional if your relay service doesn't require a user name and pass word to authenticate.)

Here is an example config key:

.. code-block:: python

   'EmailConfig': {
       'server': 'smtp.example.com',
       'port': 123,
       'sender': 'sender@example.com',
       'username': 'username',
       'password': 'password',
       'subject": "Hello from the SenderConfig module!",
       'header": "This is the header",
       'footer': "This is the footer"
   }

Usage
-----

Here's an example of how to use this module in your code:

.. code-block:: python

   from RelayMe import SenderConfig

   sender = SenderConfig(config["EmailConfig"])

   body = "This is the body of the email."
   recipient = "John.Doe@mail.com"  # (or it can come from a config file where you could list multiple emails)

   sender.send_email(body, recipient)

Here's an example of formatting with html:

.. code-block:: python

   sender = SenderConfig(config["EmailConfig"], format="html")

   body = '''  <strong>Date-time</strong>:  2023-07-21 17:56:47.943528 <br>
               <strong>id</strong>: 27 <br>
               <strong>Message</strong>: This is a message
   '''
   recipient = "John.Doe@mail.com"  # (or it can come from a config file where you could list multiple emails)

   sender.send_email(body, recipient)

Change Log
=============

0.0.8 (7/23/2023)
-----------------
-Got rid of unneccecary default html spacing

0.0.7 (07/23/2023)
------------------
-Added formating with html and the option to completely customize the entire email.

0.0.6 (07/14/2023)
-------------------
-Added more variables to the config file.

0.0.5 (07/14/2023)
-------------------
-Fixed spelling and grammer in README file

0.0.4 (07/14/2023)
-------------------
-Added more details about usage to the README file

0.0.2 (07/14/2023)
-------------------
-Improved code to read config keys regardless of capitalization
-Changed module name from 'EmailSender' to 'SenderConfig'

0.0.1 (07/13/2023)
------------------
-First Release

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "RelayMe",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "mail,email,relay,relayservice",
    "author": "Elijah Phifer",
    "author_email": "elijahphifer9@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/98/31/f6ca86266723c270e2147a917b1dd416ea2921631bc5a8d914312e1bf0a2/RelayMe-0.0.8.tar.gz",
    "platform": null,
    "description": "RelayMe\r\n=======\r\n\r\n0.0.8\r\n-----\r\n\r\nThis module is geared towards emailing using email relay services.\r\n\r\nPrerequisites\r\n-------------\r\n\r\nFirst, to install RelayMe, open your command prompt and run the following command:\r\n\r\n.. code-block:: shell\r\n\r\n   pip install RelayMe\r\n\r\nSecond, this module requires a `SenderConfig` instance to be created in your code, which can be passed into the function that sends emails.\r\n\r\nThe `SenderConfig` instance needs a config file key to be passed in, which should contain the following keys:\r\n\r\n- `server`\r\n- `port`\r\n- `sender`\r\n- `username`\r\n- `password`\r\n- `subject`\r\n- `header`\r\n- `footer`\r\n\r\n(Case doesn't matter, but spelling is important. The keys could also be named 'Server', 'PORT', 'UserName', etc.)\r\n\r\n(The order doesn't matter either. The keys can be in any order you like.)\r\n\r\n(Also the 'username' and 'password' keys are optional if your relay service doesn't require a user name and pass word to authenticate.)\r\n\r\nHere is an example config key:\r\n\r\n.. code-block:: python\r\n\r\n   'EmailConfig': {\r\n       'server': 'smtp.example.com',\r\n       'port': 123,\r\n       'sender': 'sender@example.com',\r\n       'username': 'username',\r\n       'password': 'password',\r\n       'subject\": \"Hello from the SenderConfig module!\",\r\n       'header\": \"This is the header\",\r\n       'footer': \"This is the footer\"\r\n   }\r\n\r\nUsage\r\n-----\r\n\r\nHere's an example of how to use this module in your code:\r\n\r\n.. code-block:: python\r\n\r\n   from RelayMe import SenderConfig\r\n\r\n   sender = SenderConfig(config[\"EmailConfig\"])\r\n\r\n   body = \"This is the body of the email.\"\r\n   recipient = \"John.Doe@mail.com\"  # (or it can come from a config file where you could list multiple emails)\r\n\r\n   sender.send_email(body, recipient)\r\n\r\nHere's an example of formatting with html:\r\n\r\n.. code-block:: python\r\n\r\n   sender = SenderConfig(config[\"EmailConfig\"], format=\"html\")\r\n\r\n   body = '''  <strong>Date-time</strong>:  2023-07-21 17:56:47.943528 <br>\r\n               <strong>id</strong>: 27 <br>\r\n               <strong>Message</strong>: This is a message\r\n   '''\r\n   recipient = \"John.Doe@mail.com\"  # (or it can come from a config file where you could list multiple emails)\r\n\r\n   sender.send_email(body, recipient)\r\n\r\nChange Log\r\n=============\r\n\r\n0.0.8 (7/23/2023)\r\n-----------------\r\n-Got rid of unneccecary default html spacing\r\n\r\n0.0.7 (07/23/2023)\r\n------------------\r\n-Added formating with html and the option to completely customize the entire email.\r\n\r\n0.0.6 (07/14/2023)\r\n-------------------\r\n-Added more variables to the config file.\r\n\r\n0.0.5 (07/14/2023)\r\n-------------------\r\n-Fixed spelling and grammer in README file\r\n\r\n0.0.4 (07/14/2023)\r\n-------------------\r\n-Added more details about usage to the README file\r\n\r\n0.0.2 (07/14/2023)\r\n-------------------\r\n-Improved code to read config keys regardless of capitalization\r\n-Changed module name from 'EmailSender' to 'SenderConfig'\r\n\r\n0.0.1 (07/13/2023)\r\n------------------\r\n-First Release\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Sends emails with chosen email relay service",
    "version": "0.0.8",
    "project_urls": null,
    "split_keywords": [
        "mail",
        "email",
        "relay",
        "relayservice"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9831f6ca86266723c270e2147a917b1dd416ea2921631bc5a8d914312e1bf0a2",
                "md5": "859c1c8019aa9ab34ae0493d21ce8a78",
                "sha256": "52c4aefa2aeb1171c86c27047219587b2dd4c192a52abea4ee30340f648af22c"
            },
            "downloads": -1,
            "filename": "RelayMe-0.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "859c1c8019aa9ab34ae0493d21ce8a78",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4272,
            "upload_time": "2023-07-23T16:03:15",
            "upload_time_iso_8601": "2023-07-23T16:03:15.418009Z",
            "url": "https://files.pythonhosted.org/packages/98/31/f6ca86266723c270e2147a917b1dd416ea2921631bc5a8d914312e1bf0a2/RelayMe-0.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-23 16:03:15",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "relayme"
}
        
Elapsed time: 0.09361s