A Python script for automated email sending using Resend API.
- Create and activate a Python 3 virtual environment, then install dependencies:
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
- Create your environment file:
cp .env.example .env
- Get your Resend API key from the Resend dashboard and put it in
.env
:
RESEND_API_KEY=your_resend_api_key
- Open
constants.py
and set your email configuration values:
FROM_EMAIL
EMAIL_RECIPIENTS
SUBJECT
REPLY_TO
(optional)ATTACHMENT_PATH
andATTACHMENT_NAME
(optional)
python main.py