public static class SmtpAppender.Builder extends Object implements Builder<SmtpAppender>
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
SmtpAppender |
build()
Builds the plugin object after all configuration has been set.
|
SmtpAppender.Builder |
setBcc(String bcc)
Comma-separated list of BCC email addresses.
|
SmtpAppender.Builder |
setBufferSize(int bufferSize)
Number of log events to buffer before sending an email.
|
SmtpAppender.Builder |
setCc(String cc)
Comma-separated list of CC email addresses.
|
SmtpAppender.Builder |
setFilter(Filter filter)
Overrides the default filter.
|
SmtpAppender.Builder |
setFrom(String from)
Email address of the sender.
|
SmtpAppender.Builder |
setIgnoreExceptions(boolean ignoreExceptions)
Whether to ignore exceptions thrown by the SmtpAppender.
|
SmtpAppender.Builder |
setLayout(Layout<? extends Serializable> layout)
Overrides the default layout.
|
SmtpAppender.Builder |
setName(String name)
Name of the SmtpAppender.
|
SmtpAppender.Builder |
setReplyTo(String replyTo)
Comma-separated list of Reply-To email addresses.
|
SmtpAppender.Builder |
setSmtpDebug(boolean smtpDebug)
Enables or disables mail session debugging on STDOUT.
|
SmtpAppender.Builder |
setSmtpHost(String smtpHost)
Host name of SMTP server to send messages through.
|
SmtpAppender.Builder |
setSmtpPassword(String smtpPassword)
Password to authenticate with SMTP server.
|
SmtpAppender.Builder |
setSmtpPort(int smtpPort)
Port number of SMTP server to send messages through.
|
SmtpAppender.Builder |
setSmtpProtocol(String smtpProtocol)
Transport protocol to use for SMTP such as "smtp" or "smtps".
|
SmtpAppender.Builder |
setSmtpUsername(String smtpUsername)
Username to authenticate with SMTP server.
|
SmtpAppender.Builder |
setSslConfiguration(SslConfiguration sslConfiguration)
Specifies an SSL configuration for smtps connections.
|
SmtpAppender.Builder |
setSubject(String subject)
Subject template for the email messages.
|
SmtpAppender.Builder |
setTo(String to)
Comma-separated list of recipient email addresses.
|
public Builder()
public SmtpAppender.Builder setName(String name)
public SmtpAppender.Builder setFilter(Filter filter)
ThresholdFilter
of level Level.ERROR
.public SmtpAppender.Builder setLayout(Layout<? extends Serializable> layout)
public SmtpAppender.Builder setIgnoreExceptions(boolean ignoreExceptions)
true
.public SmtpAppender.Builder setTo(String to)
public SmtpAppender.Builder setCc(String cc)
public SmtpAppender.Builder setBcc(String bcc)
public SmtpAppender.Builder setFrom(String from)
public SmtpAppender.Builder setReplyTo(String replyTo)
public SmtpAppender.Builder setSubject(String subject)
PatternLayout
public SmtpAppender.Builder setSmtpProtocol(String smtpProtocol)
public SmtpAppender.Builder setSmtpHost(String smtpHost)
public SmtpAppender.Builder setSmtpPort(int smtpPort)
public SmtpAppender.Builder setSmtpUsername(String smtpUsername)
public SmtpAppender.Builder setSmtpPassword(String smtpPassword)
public SmtpAppender.Builder setSmtpDebug(boolean smtpDebug)
public SmtpAppender.Builder setBufferSize(int bufferSize)
public SmtpAppender.Builder setSslConfiguration(SslConfiguration sslConfiguration)
public SmtpAppender build()
Builder
build
in interface Builder<SmtpAppender>
Copyright © 1999-2021 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.