Skip to content

Send an email to a company that wan't to play with you but you don't have time too

License

Unknown, CECILL-2.1 licenses found

Licenses found

Unknown
LICENSE
CECILL-2.1
LICENSE.fr
Notifications You must be signed in to change notification settings

M0NsTeRRR/autoemailsmtp

This script will send an email and send you an alert on the configured notifiers

PyPI PyPI versions Python test Code Style

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

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 adapted to your use case). Service file

[Unit]
Description=send an email
After=network-online.target

[Service]
User=autoemailsmtp
Group=autoemailsmtp
EnvironmentFile=/etc/autoemailsmtp/.env
Type=oneshot
ExecStart=/opt/autoemailsmtp/venv/bin/python -m autoemailsmtp.send_mail --to email@example.fr --template /etc/autoemailsmtp/template.j2
[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

Install and setup dependencies

poetry install
poetry shell
pre-commit install

Run pre-commit

pre-commit run --all-files

Contributing

We welcome and encourage contributions to this project! Please read the Contributing guide. Also make sure to check the Code of Conduct and adhere to its guidelines

Security

See SECURITY.md file for details.

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

About

Send an email to a company that wan't to play with you but you don't have time too

Resources

License

Unknown, CECILL-2.1 licenses found

Licenses found

Unknown
LICENSE
CECILL-2.1
LICENSE.fr

Code of conduct

Security policy

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published