Mailtoolsbox

Latest version: v1.0.0

Safety actively analyzes 706267 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0.0

✅ Brand New `EmailSender` Class
- Fully revamped, modernized API for sending emails.
- Supports **HTML emails, plain text, and attachments**.
- Multiple recipients with **To, CC, and BCC** support.
- **TLS/SSL security** for encrypted email transmission.

📂 Enhanced Attachment Handling
- Easily send **multiple files** in one email.
- Improved error handling for missing attachments.

🏗 Jinja2 Template Support
- Create **dynamic HTML emails** using templates.
- Better **separation of content and design**.

🔐 Security & Email Validation
- Uses `email-validator` to check **valid recipient emails**.
- Secure authentication with **TLS/SSL encryption**.

🛠 Logging & Error Handling
- Built-in **logging module** to track issues.
- Graceful handling of **SMTP errors**.

🔄 Backward Compatibility
- The legacy `SendAgent` class is still available.
- Encourages **migration to `EmailSender`**.

---

📥 How to Install/Upgrade
Use `pip` to install or upgrade to the latest version:

sh
pip install --upgrade MailToolsBox


---

🚀 Quick Start

**Sending a Basic Email**

python
from MailToolsBox import EmailSender

sender = EmailSender(
user_email="youremail.com",
server_smtp_address="smtp.example.com",
user_email_password="yourpassword",
port=587
)

sender.send(
recipients=["recipientexample.com"],
subject="Hello from MailToolsBox",
message_body="This is a test email!"
)


**Using Jinja2 Templates**

python
context = {
"username": "John Doe",
"activation_link": "https://example.com/activate"
}

sender.send_template(
recipient="recipientexample.com",
subject="Welcome to Our Service",
template_name="welcome.html",
context=context
)


---

📦 Download Assets
- **📥 mailtoolsbox-1.0.0.tar.gz** (Source distribution)
- **📥 MailToolsBox-1.0.0-py3-none-any.whl** (Pre-built wheel package)

---

📌 Resources
🔗 **Official Documentation**: [rambod.net](https://www.rambod.net)
📦 **PyPI Package**: [MailToolsBox on PyPI](https://pypi.org/project/MailToolsBox/)
🛠 **GitHub Repository**: [MailToolsBox on GitHub](https://github.com/rambod/MailToolsBox)

---

🤝 Contributing
We welcome contributions! If you'd like to improve MailToolsBox:
1. Fork the repository.
2. Create a feature branch.
3. Implement changes and write tests.
4. Submit a **pull request**.

---

📢 **Upgrade to MailToolsBox 1.0.0 today! Let us know your feedback and feature requests! 🚀**

0.1.0.3

**Full Changelog**: https://github.com/rambod/MailToolsBox/compare/0.1.0.2...0.1.0.3

0.1.0.1

Mail toolboxes are an essential component for developers building a mail sender or mail server. They simplify the development process and increase efficiency by providing developers with pre-built modules and functions that can be easily integrated into their projects. The codes provided for the project are a valuable resource, but there is always room for further improvement and refinement. By continuously improving and enhancing the mail toolboxes, developers can stay up-to-date with the latest technologies and create more effective and streamlined mail applications.

0.0.4.6

Imap Usage

from MailToolsBox.imapClient import ImapAgent

EMAIL_ACCOUNT = "myaddressgmail.com"
PASSWORD = "mypassword"
SERVER_ADDRESS = ('my server address or domain name or ip ex:"imap.gmail.com" ')

x = ImapAgent(email_account=EMAIL_ACCOUNT, password=PASSWORD, server_address=SERVER_ADDRESS)
x.download_mail_text() optional parameter : (lookup='ALL',save=True,path='/home/user/')
x.download_mail_json() return json format | optional parameter : (lookup='ALL',save=True,filename='filename.json',path='/home/user/')
x.download_mail_msg() optional parameter : (lookup='ALL',path='/home/user/')

0.0.3.1

MailToolsBox is a Python library for dealing with Email handling in easy way.

Links

Releases

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.