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.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Karchnu 13aa6a2019
README, default template repository, template example.
3 years ago
src README, default template repository, template example. 3 years ago
templates README, default template repository, template example. 3 years ago
.gitignore Initial commit for the generic mailer. 3 years ago
README.md README, default template repository, template example. 3 years ago
shard.yml Initial commit for the generic mailer. 3 years ago

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