autoemailsmtp


Nameautoemailsmtp JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/M0NsTeRRR/AutoEmail
SummarySend mail to SMTP
upload_time2023-03-13 20:03:10
maintainer
docs_urlNone
authorLudovic Ortega
requires_python>=3.8,<4.0
licenseCeCILL
keywords email smtp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This script will send an email and send you an alert on the configured notifiers

[![PyPI](https://img.shields.io/pypi/v/autoemailsmtp.svg)](https://pypi.python.org/pypi/autoemailsmtp)
[![PyPI versions](https://img.shields.io/pypi/pyversions/autoemailsmtp.svg)](https://pypi.python.org/pypi/autoemailsmtp)
[![Python test](https://github.com/M0NsTeRRR/autoemailsmtp/actions/workflows/test.yml/badge.svg)](https://github.com/M0NsTeRRR/autoemailsmtp/actions/workflows/test.yml)
[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

# Why ?
When a company wants you to send an email every month to get what you need because they don't want to send it automatically to piss you off.
![meme](https://media3.giphy.com/media/O1xeZ4AgSaNBS/giphy.gif)


# Install
```
pip install autoemailsmtp
```

# Config
Create an `.env` file with this content or create environment variables
```
AUTOEMAILSMTP_SMTP_HOST="smtp.example.com"
AUTOEMAILSMTP_SMTP_PORT=587
AUTOEMAILSMTP_SMTP_USERNAME="toto@example.com"
AUTOEMAILSMTP_SMTP_PASSWORD="mypassword"

Optional:
AUTOEMAILSMTP_LOG_LEVEL="INFO"
AUTOEMAILSMTP_DISCORD_WEBHOOK_URL="https://discord.com/api/webhooks/aaaaaa/aaaaa"
```

# Systemd
To send an email each month you can setup a cron or use systemd like (must be adapated).
Service file
```
[Unit]
Description=send an email
After=network-online.target

[Service]
Type=oneshot
ExecStart=/opt/autoemailsmtp/venv/bin/python autoemailsmtp.send_mail.py --to email@example.com --subject "rent" --file rent_receipt --discord

[Install]
WantedBy=multi-user.target
```

Systemd timer file
```
[Unit]
Description=Send an email on the 10th of every month

[Timer]
OnCalendar=*-*-10 08:00:00

[Install]
WantedBy=timers.target
```

# Dev
Install [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer)

Install and setup dependencies
```bash
poetry install
poetry shell
pre-commit install
```

### Run pre-commit
```bash
pre-commit run --all-files
```

# Licence

The code is under CeCILL license.

You can find all details here: https://cecill.info/licences/Licence_CeCILL_V2.1-en.html

# Credits

Copyright © Ludovic Ortega, 2023

Contributor(s):

-Ortega Ludovic - ludovic.ortega@adminafk.fr

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/M0NsTeRRR/AutoEmail",
    "name": "autoemailsmtp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "email,smtp",
    "author": "Ludovic Ortega",
    "author_email": "ludovic.ortega@adminafk.fr",
    "download_url": "https://files.pythonhosted.org/packages/d2/23/8d8a1dbff048d737ba5576fed9a92f6c2bd62527a6de73999f8ce5c9ac8a/autoemailsmtp-0.1.0.tar.gz",
    "platform": null,
    "description": "This script will send an email and send you an alert on the configured notifiers\n\n[![PyPI](https://img.shields.io/pypi/v/autoemailsmtp.svg)](https://pypi.python.org/pypi/autoemailsmtp)\n[![PyPI versions](https://img.shields.io/pypi/pyversions/autoemailsmtp.svg)](https://pypi.python.org/pypi/autoemailsmtp)\n[![Python test](https://github.com/M0NsTeRRR/autoemailsmtp/actions/workflows/test.yml/badge.svg)](https://github.com/M0NsTeRRR/autoemailsmtp/actions/workflows/test.yml)\n[![Code Style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n# Why ?\nWhen a company wants you to send an email every month to get what you need because they don't want to send it automatically to piss you off.\n![meme](https://media3.giphy.com/media/O1xeZ4AgSaNBS/giphy.gif)\n\n\n# Install\n```\npip install autoemailsmtp\n```\n\n# Config\nCreate an `.env` file with this content or create environment variables\n```\nAUTOEMAILSMTP_SMTP_HOST=\"smtp.example.com\"\nAUTOEMAILSMTP_SMTP_PORT=587\nAUTOEMAILSMTP_SMTP_USERNAME=\"toto@example.com\"\nAUTOEMAILSMTP_SMTP_PASSWORD=\"mypassword\"\n\nOptional:\nAUTOEMAILSMTP_LOG_LEVEL=\"INFO\"\nAUTOEMAILSMTP_DISCORD_WEBHOOK_URL=\"https://discord.com/api/webhooks/aaaaaa/aaaaa\"\n```\n\n# Systemd\nTo send an email each month you can setup a cron or use systemd like (must be adapated).\nService file\n```\n[Unit]\nDescription=send an email\nAfter=network-online.target\n\n[Service]\nType=oneshot\nExecStart=/opt/autoemailsmtp/venv/bin/python autoemailsmtp.send_mail.py --to email@example.com --subject \"rent\" --file rent_receipt --discord\n\n[Install]\nWantedBy=multi-user.target\n```\n\nSystemd timer file\n```\n[Unit]\nDescription=Send an email on the 10th of every month\n\n[Timer]\nOnCalendar=*-*-10 08:00:00\n\n[Install]\nWantedBy=timers.target\n```\n\n# Dev\nInstall [Poetry](https://python-poetry.org/docs/master/#installing-with-the-official-installer)\n\nInstall and setup dependencies\n```bash\npoetry install\npoetry shell\npre-commit install\n```\n\n### Run pre-commit\n```bash\npre-commit run --all-files\n```\n\n# Licence\n\nThe code is under CeCILL license.\n\nYou can find all details here: https://cecill.info/licences/Licence_CeCILL_V2.1-en.html\n\n# Credits\n\nCopyright \u00a9 Ludovic Ortega, 2023\n\nContributor(s):\n\n-Ortega Ludovic - ludovic.ortega@adminafk.fr\n",
    "bugtrack_url": null,
    "license": "CeCILL",
    "summary": "Send mail to SMTP",
    "version": "0.1.0",
    "split_keywords": [
        "email",
        "smtp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c61d92f05daa7fb43366754e49cde1e6fd1d71272b2139727bb332bdbb53cd33",
                "md5": "655ce58b2cb130fca7468cc461c8fce7",
                "sha256": "4fc8bb883367abd4a862cb266489672aec59375037ba845118860eb42d555994"
            },
            "downloads": -1,
            "filename": "autoemailsmtp-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "655ce58b2cb130fca7468cc461c8fce7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 35897,
            "upload_time": "2023-03-13T20:03:09",
            "upload_time_iso_8601": "2023-03-13T20:03:09.268413Z",
            "url": "https://files.pythonhosted.org/packages/c6/1d/92f05daa7fb43366754e49cde1e6fd1d71272b2139727bb332bdbb53cd33/autoemailsmtp-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d2238d8a1dbff048d737ba5576fed9a92f6c2bd62527a6de73999f8ce5c9ac8a",
                "md5": "d5a4d4f33aeca9f85c34fc9e40d6bcae",
                "sha256": "8f8cc1233971648b3f1dc40a32c7f653931ca089cec9d815cefc42093a95aef7"
            },
            "downloads": -1,
            "filename": "autoemailsmtp-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d5a4d4f33aeca9f85c34fc9e40d6bcae",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 18198,
            "upload_time": "2023-03-13T20:03:10",
            "upload_time_iso_8601": "2023-03-13T20:03:10.743461Z",
            "url": "https://files.pythonhosted.org/packages/d2/23/8d8a1dbff048d737ba5576fed9a92f6c2bd62527a6de73999f8ce5c9ac8a/autoemailsmtp-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-13 20:03:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "M0NsTeRRR",
    "github_project": "AutoEmail",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "autoemailsmtp"
}
        
Elapsed time: 0.07135s