Skip to content

Add Support for Custom Headers in SMTP Appender #3704

Description

@ppkarwasz

Currently, the SMTP Appender does not support adding custom headers to outgoing email messages. In contrast, the HTTP Appender allows users to define custom headers using <Property> elements. Introducing similar support for the SMTP Appender would enhance feature parity across appenders and improve user experience and flexibility.

Proposed Solution

Both the HTTP and SMTP Appenders extend AbstractFilterable and already support <Property> configuration elements. In the HTTP Appender, these <Property> elements are interpreted as HTTP headers. Similarly, the SMTP Appender could treat <Property> entries as custom email headers.

Example:

<Appenders>
  <SMTP name="Email" ...>
    <Property name="X-Custom-ID" value="12345"/>
    <Property name="Reply-To" value="noreply@example.com"/>
  </SMTP>
</Appenders>

This change would preserve existing behavior while enabling greater customization for advanced email use cases.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

appendersAffects one or more Appender pluginsenhancementAdditions or updates to features

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions