This is a generic mailer. It can be used to send emails via a template. In a near future, it will be able to be a daemon so we can request it through libipc.
 
 
Go to file
Philippe Pittoli 980ec543b1 Fix dependency. 2023-02-03 07:25:27 +01:00
src README, default template repository, template example. 2020-11-01 21:56:41 +01:00
templates README, default template repository, template example. 2020-11-01 21:56:41 +01:00
.gitignore Initial commit for the generic mailer. 2020-11-01 16:28:02 +01:00
README.md README, default template repository, template example. 2020-11-01 21:56:41 +01:00
shard.yml Fix dependency. 2023-02-03 07:25:27 +01:00

README.md

USAGE

As all programs from Baguette repositories, a -h option is available for the program.

mailer -h

Sending a mail

# One-shot email transfer.
# mailer send <template> <email>
login=mypseudo token=aabbccdd  mailer send activation-email test@example.com

Configuration

As all programs from Baguette repositories, a configuration file either in the $XDG_CONFIG_HOME/baguette/ (first guess) or in the /etc/baguette/ directory can be used.

Here an exhaustive example:

# ~/.config/baguette/mailer.yml

# SMTPd configuration.
smtpd_host: localhost
smtpd_port: 25

# Where to find templates, if not in the defaut directory (/etc/baguette/mailer/templates/).
template_directory: /path/to/mailer/templates

# Configuration for each template.
templates:
    # Template name, associated to the mail configuration: "from" and "subject" headers.
    mail-activation-fr:
        from: no-reply@example.com
        subject: Account activation on the example.com website
    mail-recovery-fr:
        from: no-reply@example.com
        subject: Mail recovery for the example.com website

Templates

Templates:

  • are in the Crinja format (a Jinja derivative)
  • located by default in /etc/baguette/mailer/templates