Metadata-Version: 2.4
Name: osmia
Version: 1.0.0
Summary: An ultra-simple and SOLID Python library for sending emails with attachments and HTML or plain text support.
Home-page: https://github.com/Tina-1300/Osmia
Author: Tina
Author-email: tina.xytrfgthuji1348@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications :: Email
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# Osmia
An ultra-simple and SOLID Python library for sending emails with attachments and HTML or plain text support.

---

## ✨ Features
- Send emails with plain text or HTML
- Easily add multiple attachments
- SOLID-compliant architecture
- Simple and clean interface

---

## 🚀 Installation

```bash
git clone https://github.com/Tina-1300/Osmia.git
```

example usage of library :

```python
from Osmia.email_message import EmailMessage
from Osmia.email_config import EmailConfig

# Configuration de l'email
config = EmailConfig(
    smtp_server="smtp.gmail.com", # server smtp
    smtp_port=587, # port smtp
    login="email@gmail.com", # email de l'envoyeur 
    password="mot de passe d'application" # password d'application
)

# Création du mail
email = EmailMessage(
    config.smtp_server,
    config.smtp_port,
    config.login,
    config.password
)

html_message = """
<html>
    <body>
        <h1 style="color:blue;">Ceci est un test HTML !</h1>
        <p>Envoi d'un email en <b>HTML</b> avec une pièce jointe.</p>
    </body>
</html>
"""

text_message = "Ceci est un test."

format_mail = ["plain", "html"]

response = email.send_email(
    to_email="destinataire@gmail.com", # email du destinataire 
    subject="Test Email",
    message=html_message, 
    type_email=str(format_mail[1]), # html => pour envoyer sous format html, plain => sous format text
    list_files=["random.hpp", "libcurl-x64.dll"] # 1 ou plusieur fichier cela fonctionne
)
```
