🛠️ Project Scaffold for SetMail
📁 Folder structure:
setmail/
├── __init__.py
setup.py
README.md
📄 setup.py
from setuptools import setup
setup(
name='SetMail',
version='0.1',
author='Your Name',
author_email='your@email.com',
description='Minimalist email sending for Python — just import and send',
long_description=open("README.md").read(),
long_description_content_type='text/markdown',
url='https://pypi.org/project/SetMail/',
packages=['setmail'],
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
],
python_requires='>=3.7',
)
📄 setmail/__init__.py (placeholder logic)
import smtplib
from email.mime.text import MIMEText
import os
def send(to, subject, body, sender=None, smtp_server=None, password=None):
sender = sender or os.getenv("SETMAIL_FROM")
smtp_server = smtp_server or os.getenv("SETMAIL_SMTP")
password = password or os.getenv("SETMAIL_PASS")
if not all([sender, smtp_server, password]):
raise ValueError("Missing SMTP configuration.")
msg = MIMEText(body, "plain")
msg["Subject"] = subject
msg["From"] = sender
msg["To"] = to
host, port = smtp_server.split(":")
with smtplib.SMTP_SSL(host, int(port)) as server:
server.login(sender, password)
server.sendmail(sender, [to], msg.as_string())
📄 README.md
# SetMail
> The simplest way to send email in Python — no setup, just import and go.
[](https://pypi.org/project/SetMail/)
[](https://opensource.org/licenses/MIT)
[](https://python.org)
---
### 💡 What is SetMail?
SetMail is a zero-config SMTP mail sender designed for small Python projects.
Use environment variables or pass values manually — and you're sending in seconds.
---
### 📦 Install
```bash
pip install setmail
🚀 Example
import setmail
setmail.send(
to="hello@example.com",
subject="Test Email",
body="This was sent using SetMail!"
)
⚙️ Environment Variables
You can configure SetMail globally with these:
export SETMAIL_FROM="you@example.com"
export SETMAIL_SMTP="smtp.example.com:465"
export SETMAIL_PASS="yourpassword"
Then just call send() with to, subject, and body.
🔐 Security Tip
Don't hardcode passwords in code — use .env, CI secrets, or vault systems.
📄 License
MIT. Lightweight and open to contributions.
Metadata
Release files for SetMail 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| SetMail-0.1.tar.gz | 2.3 kB | Without provenance | Details for SetMail-0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| SetMail-0.1-py3-none-any.whl | Python 3 | none | any | Details for SetMail-0.1-py3-none-any.whl |
Total release size: 4.7 kB
Release files / SetMail-0.1.tar.gz
| Download URL | SetMail-0.1.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0e4059e799cd00ade23066f753ceef1c33aeff3288b3d432330bbab3f01ffcd
|
|
BLAKE2b-256 checksum How to use checksums |
26712961b3a1b08b86d8be84cc89e194120efa1fddffc194505617bb90110718
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / SetMail-0.1-py3-none-any.whl
| Download URL | SetMail-0.1-py3-none-any.whl |
|---|---|
| Size | 2.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fdc65bb5572314bef88437226e8afe2e554b85f45e734dbfaf877abe5672e45a
|
|
BLAKE2b-256 checksum How to use checksums |
51b4c2f257464a0e453f03111c4d472c796afda4c2e7ec58a0a343c10c7c1ca7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Security for SetMail 0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.