Skip to main content

Forge mail — composition d'emails, transports interchangeables, templates Jinja et CLI mail:*.

Project description

forge-mvc-mail

Opt-in Forge pour l'envoi d'emails. Extrait du core (ADR-022) : le core ne contient que les primitives générales ; l'email est une brique spécialisée, optionnelle.

Contenu

  • MailMessage : composition d'un message (destinataires, sujet, texte, HTML).
  • Transports interchangeables : ConsoleTransport (affichage), SmtpTransport (SMTP réel), LogTransport, NullTransport, FakeTransport (tests).
  • MailTemplateRenderer : rendu de templates d'email via Jinja2.
  • Mailer : orchestration envoi + journalisation (MailLogger).
  • MailConfig : configuration depuis l'environnement.
  • CLI mail:init, mail:test, mail:render, mail:doctor, mail:logs.

Installation

pip install --pre forge-mvc-mail

Usage

from forge_mvc_mail import Mailer, MailMessage, ConsoleTransport

mailer = Mailer(transport=ConsoleTransport())
mailer.send(MailMessage(
    subject="Bienvenue",
    to="client@example.com",
    body_text="Merci de votre inscription.",
))

Le transport est interchangeable : ConsoleTransport (développement), SmtpTransport (SMTP réel), LogTransport, FakeTransport (tests). En production, MailConfig lit la configuration SMTP depuis l'environnement.

Le parcours pédagogique welcome-mail (documentation docs/starters/welcome-mail/) montre l'usage pas à pas.

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

forge_mvc_mail-1.0.0rc2.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

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

forge_mvc_mail-1.0.0rc2-py3-none-any.whl (18.8 kB view details)

Uploaded Python 3

File details

Details for the file forge_mvc_mail-1.0.0rc2.tar.gz.

File metadata

  • Download URL: forge_mvc_mail-1.0.0rc2.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for forge_mvc_mail-1.0.0rc2.tar.gz
Algorithm Hash digest
SHA256 7ae81c02186d8c6bdd345958347d04476a57600cc123fc158dda3120f06b7b9e
MD5 32dc18cb88f7865f6a105b3b26f7f65e
BLAKE2b-256 a1c97fb864ff8b3cf72cd05d5043343d4648188f0f66d3813a9f1e63a783534c

See more details on using hashes here.

File details

Details for the file forge_mvc_mail-1.0.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for forge_mvc_mail-1.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 424394eeaf13d321fc3b6615d93bc7a86b62f679ac0be19e2f3b3d74d70fba9b
MD5 615ad9ed6c9e0afeb6061cd179710886
BLAKE2b-256 f1009a61412d362041b720518a65f42d3a0dac176599490d2b0195529e79664f

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