You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

autoemailsmtp

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autoemailsmtp

Send mail to SMTP

0.1.0
pipPyPI
Maintainers
1

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 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

Install and setup dependencies

poetry install
poetry shell
pre-commit install

Run pre-commit

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

Keywords

email

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts