# template

Selects the template used for the mail body when body text is enabled.

This parameter applies to ommail: Mail Output Module.

Name:

  template

Scope:

  input

Type:

  word

Default:

  input=RSYSLOG_FileFormat

Required?:

  no

Introduced:

  8.5.0

## Description

Specifies the name of the template for the mail body. This parameter is only effective if bodyEnable is “on” (which is the default).

## Input usage

    module(load="ommail")
    template(name="mailBody" type="string" string="Message: %msg%")
    action(
        type="ommail"
        server="mail.example.net"
        port="25"
        mailFrom="rsyslog@example.net"
        mailTo="operator@example.net"
        template="mailBody"
    )

## See also

See also ommail: Mail Output Module.

Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.