Getting started
Requirements
- Python 3.13 or newer
- An SMTP server you are allowed to test
- No runtime dependencies beyond the standard library
Install
Library import:
from lupaxa.smtp_tester import send_test_message
result = send_test_message(
"smtp.example.com",
587,
"USER",
"PASS",
"from@example.com",
"to@example.com",
)
print(result.ok, result.detail, result.smtp_code)
Module entry point:
From source (development)
First run
Pass From, To, and the SMTP host. Add username and password when the server requires AUTH:
smtp-tester --from-address from@example.com --to-address to@example.com \
--smtp-username USER --smtp-password PASS \
--smtp-server smtp.example.com --smtp-port 587
Prefer SMTP_USERNAME and SMTP_PASSWORD instead of putting
credentials on the command line. STARTTLS is required on this path; the
send fails if the server does not advertise it. Use --tls with port
465 for implicit TLS. Use --no-starttls only for a plaintext
internal relay. --verbose logs steps without protocol payloads. A
successful send prints email sent to … and exits 0. Failures go to
stderr and exit 1.