autoemailsmtp-0.1.0
توضیحات
Send mail to SMTP
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | autoemailsmtp-0.1.0 |
| نام | autoemailsmtp |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Ludovic Ortega |
| ایمیل نویسنده | ludovic.ortega@adminafk.fr |
| آدرس صفحه اصلی | https://github.com/M0NsTeRRR/AutoEmail |
| آدرس اینترنتی | https://pypi.org/project/autoemailsmtp/ |
| مجوز | CeCILL |
This script will send an email and send you an alert on the configured notifiers
[](https://pypi.python.org/pypi/autoemailsmtp)
[](https://pypi.python.org/pypi/autoemailsmtp)
[](https://github.com/M0NsTeRRR/autoemailsmtp/actions/workflows/test.yml)
[](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.

# 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
نیازمندی
| مقدار | نام |
|---|---|
| >=2.28.2,<3.0.0 | requests |
| >=1.10.6,<2.0.0 | pydantic[dotenv] |
| >=3.1.2,<4.0.0 | jinja2 |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8,<4.0 | Python |
نحوه نصب
نصب پکیج whl autoemailsmtp-0.1.0:
pip install autoemailsmtp-0.1.0.whl
نصب پکیج tar.gz autoemailsmtp-0.1.0:
pip install autoemailsmtp-0.1.0.tar.gz