Permite enviar correos electrónicos con plantillas DOCX.
Project description
sendmail-docx
Para enviar emails usando una plantilla docx.
Installación
pip install sendmail-docx
Dependencias
pip install python-docx python-dotenv mammoth
Uso
from sendmail-docx import enviar_correo_electronico
import os
def main():
# Enviar un mail de prueba
resultado = enviar_correo_electronico(
template_path=os.path.join("tests", "templates", "plantilla-ejemplo.docx"),
datos={"nombre": "John Doe", "saldo": "1.235,50 €"},
asunto="Comunicación de saldo",
destinatarios=["destinatario@mail.com"],
cc=[],
cco=[],
adjuntos=['factura.pdf', 'images/logo.png']
)
print(f"{resultado=}")
if __name__ == '__main__':
main()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sendmail_docx-0.1.3.tar.gz
(5.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sendmail_docx-0.1.3.tar.gz.
File metadata
- Download URL: sendmail_docx-0.1.3.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d67d903137d6bfd6e335ebff67e26ff102d9c85a3e14fb82a05116db659cbca3
|
|
| MD5 |
391aebdaf291e0e998c7bdfc8c889b32
|
|
| BLAKE2b-256 |
0c8dc158bc5edf4efead988d291eff92a06a3175f6fbf37353bb1f59d18b9be4
|
File details
Details for the file sendmail_docx-0.1.3-py3-none-any.whl.
File metadata
- Download URL: sendmail_docx-0.1.3-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66546c3e6fb7c490534869d653c15525ad50390b83a68e724ec9eacc0d17a9eb
|
|
| MD5 |
25cad8b47139d8bb95eb60308ffeb5ee
|
|
| BLAKE2b-256 |
5ac9c77a67cc83973c3be6d88d927039ed24c149373df7c0699fda26eab9a805
|