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.2.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.2-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file sendmail_docx-0.1.2.tar.gz.

File metadata

  • Download URL: sendmail_docx-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 bf5bb8e4d545e7e2c7ca5f6de1b0a61723c0cc0dd6bbdb0dfee981675b51dc70
MD5 b9f5c66b65b6985ee471e6273d884cd3
BLAKE2b-256 7814f256d416b7843fb3d818f4ea1ba30ed6661a1085b5d85d047776b36a8029

See more details on using hashes here.

File details

Details for the file sendmail_docx-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sendmail_docx-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5adc10bd4b90b2a144c50b5e8e39f20a6d8dcfa7925065d3cddb3fc71cb5ed08
MD5 30e7a758fb06215e49675463fc2e56bd
BLAKE2b-256 78e8aa3de289977052e690e53ac03ad66f3e671e7f58f92271a7aabafd6b5666

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