Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sendmail_docx-0.1.3-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

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

Hashes for sendmail_docx-0.1.3.tar.gz
Algorithm Hash digest
SHA256 d67d903137d6bfd6e335ebff67e26ff102d9c85a3e14fb82a05116db659cbca3
MD5 391aebdaf291e0e998c7bdfc8c889b32
BLAKE2b-256 0c8dc158bc5edf4efead988d291eff92a06a3175f6fbf37353bb1f59d18b9be4

See more details on using hashes here.

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

Hashes for sendmail_docx-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 66546c3e6fb7c490534869d653c15525ad50390b83a68e724ec9eacc0d17a9eb
MD5 25cad8b47139d8bb95eb60308ffeb5ee
BLAKE2b-256 5ac9c77a67cc83973c3be6d88d927039ed24c149373df7c0699fda26eab9a805

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page