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.4.tar.gz (5.8 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.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sendmail_docx-0.1.4.tar.gz
  • Upload date:
  • Size: 5.8 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.4.tar.gz
Algorithm Hash digest
SHA256 5e0214a7966525f88f8a1f4a94f8492ab8c422b007be05807428ceb6e55285d6
MD5 bb8159bc73f2542465134cdf8d71e209
BLAKE2b-256 db0a76189b685a50241a8a968cf0d2dcb8fc606d1533c7d97c986e9eb97574b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sendmail_docx-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7e969fa595971aa26f47e3243715494f5524e8449ccdadb36a8b06c109bce522
MD5 8a1888ee5b1412b12960955813b146fb
BLAKE2b-256 775210ead29b76a30b9638dec1d96715c93d33cb320174e5f7679e4fefb36032

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