Default configurer for Thymeleaf template engine that is automatically
applied every time a
MessagingBuilder
instance is created through
MessagingBuilder.standard()
or
MessagingBuilder.minimal()
.
The configurer has a priority of 90000 in order to be applied after global
configurer but before any sender implementation.
This configurer is applied only if
org.thymeleaf.TemplateEngine
is
present in the classpath. If not present, template engine is not registered
at all.
This configurer inherits environment configuration (see
BuildContext
).
It also copies resource resolution configuration of
DefaultMessagingConfigurer
to inherit resource resolution lookups
(see ResourceResolutionBuilder
).
This configurer applies the following configuration:
- Configures template prefix/suffix paths:
- Uses the first property that has a value for classpath resolution prefix:
- "ogham.email.thymeleaf.classpath.path-prefix"
- "ogham.email.template.classpath.path-prefix"
- "ogham.email.thymeleaf.path-prefix"
- "ogham.email.template.path-prefix"
- "ogham.template.path-prefix"
- Uses the first property that has a value for classpath resolution suffix:
- "ogham.email.thymeleaf.classpath.path-suffix"
- "ogham.email.template.classpath.path-suffix"
- "ogham.email.thymeleaf.path-suffix"
- "ogham.email.template.path-suffix"
- "ogham.template.path-suffix"
- Uses the first property that has a value for file resolution prefix:
- "ogham.email.thymeleaf.file.path-prefix"
- "ogham.email.template.file.path-prefix"
- "ogham.email.thymeleaf.path-prefix"
- "ogham.email.template.path-prefix"
- "ogham.template.path-prefix"
- Uses the first property that has a value for file resolution suffix:
- "ogham.email.thymeleaf.file.path-suffix"
- "ogham.email.template.file.path-suffix"
- "ogham.email.thymeleaf.path-suffix"
- "ogham.email.template.path-suffix"
- "ogham.template.path-suffix"
- Configures email alternative content:
- Automatically loads HTML template if extension is .html
- Automatically loads text template if extension is .txt
- Configures template detection: