Install & Compatibility
Where this runs
tested against v0.6.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.372s · 19.4MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 1.8s · import 0.337s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
EmailSender
✓ from redmail import EmailSender
Main class for sending emails.
GmailSender
✓ from redmail import GmailSender
✗ from redmail.gmail import GmailSender
GmailSender is directly from redmail, not a submodule.
OutlookSender
✓ from redmail import OutlookSender
✗ from redmail.outlook import OutlookSender
OutlookSender is directly from redmail, not a submodule.
Basic usage: create an EmailSender with SMTP credentials and send a simple email.
from redmail import EmailSender
email = EmailSender(
host="smtp.example.com",
port=587,
username="user@example.com",
password="secret",
use_startls=True
)
email.send(
subject="Example",
receivers=["recipient@example.com"],
text="Hello!",
html="<h1>Hello!</h1>"
)
Errors
Common errors & fixes
AttributeError: 'EmailSender' object has no attribute 'user_name'
The parameter `user_name` was renamed to `username` in v0.4.0.
fixUse `username='your@email.com'` instead of `user_name='...'`.
ModuleNotFoundError: No module named 'pandas'
Tried to use pandas-related features (like table prettifying) without having pandas installed.
fixInstall pandas with `pip install pandas` or install redmail with extras: `pip install redmail[pandas]`.
smtplib.SMTPAuthenticationError: (535, b'5.7.8 Username and Password not accepted')
Incorrect email credentials or less secure app access not enabled (for Gmail).
fixCheck username/password, enable less secure app access or use an app password.
Upgrade
Version history
0.6.0latest on PyPI · released Feb 25, 2023
Audit
Dependencies
jinja2optionalRequired for Jinja templating; included automatically.
pandasoptionalOptional for table prettifying with DataFrames.