See http://logback.qos.ch/manual/appenders.html#SMTPAppender for further documentation.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv boolean | |
| protected Future | |
| protected CyclicBufferTracker | |
| private String | |
| pack-priv long | |
| protected Discriminator | |
| pack-priv static InternetAddress[] | |
| private int | |
| protected EventEvaluator | |
| private String | |
| private String | |
| pack-priv long | |
| protected Layout | |
| pack-priv String | |
| pack-priv static final long | |
| pack-priv String | |
| protected Session | |
| private boolean | |
| private String | |
| private int | |
| private boolean | |
| private boolean | |
| protected Layout | |
| private String | |
| private List | |
| pack-priv String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| protected void | append(E eventObject)
Implements abstract ch. |
| private Session | |
| public boolean | |
| protected abstract boolean | |
| protected abstract void | |
| pack-priv InternetAddress | |
| public String | |
| public CyclicBufferTracker | |
| public Discriminator | |
| public String | |
| public String | |
| public Layout | |
| public String | |
| public String | |
| public String | |
| public String | |
| public int | |
| public int | |
| public String | |
| public List | |
| public List | |
| public String | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| private Session | |
| protected abstract PatternLayoutBase | |
| protected abstract Layout | Returns: a layout as appropriate for the modulereturn a layout for the subject string as appropriate for the module. |
| private List | |
| protected void | sendBuffer(CyclicBuffer<E> cb, E lastEventObject)
Send the contents of the cyclic buffer as an e-mail message. |
| public void | setAsynchronousSending(boolean
determines whether sending is done asynchronously
or not asynchronousSending)By default, SMTAppender transmits emails asynchronously. |
| public void | setCharsetEncoding(String charsetEncoding)
Set the character set encoding of the outgoing email messages. |
| public void | |
| public void | |
| public void | setEvaluator(EventEvaluator<E> eventEvaluator)
The EventEvaluator option takes a string value representing the name
of the class implementing the |
| public void | |
| public void | setJndiLocation(String jndiLocation)
Set the location where a |
| public void | |
| public void | setLocalhost(String localhost)
Set the "mail.smtp.localhost" property to the value passed as parameter to this method. |
| public void | |
| public void | setSessionViaJNDI(boolean
whether to obtain a javax.mail.Session by JNDI sessionViaJNDI)If set to true, a |
| public void | |
| public void | setSmtpHost(String smtpHost)
The smtpHost option takes a string value which should be the host name of the SMTP server that will send the e-mail message. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setSubject(String subject)
The Subject option takes a string value which should be the subject of the e-mail message. |
| public void | |
| public void | start()
Overrides ch. Implements ch. |
| public synchronized void | stop()
Overrides ch. Implements ch. |
| protected abstract void | |
| protected void | updateMimeMsg(MimeMessage mimeMsg, CyclicBuffer<E> cb, E lastEventObject)
Allows to extend classes to update mime message (e.g.: Add headers) |
| asynchronousSending | back to summary |
|---|---|
| pack-priv boolean asynchronousSending | |
| asynchronousSendingFuture | back to summary |
|---|---|
| protected Future<?> asynchronousSendingFuture | |
| cbTracker | back to summary |
|---|---|
| protected CyclicBufferTracker<E> cbTracker | |
| charsetEncoding | back to summary |
|---|---|
| private String charsetEncoding | |
| delayBetweenStatusMessages | back to summary |
|---|---|
| pack-priv long delayBetweenStatusMessages | |
| discriminator | back to summary |
|---|---|
| protected Discriminator<E> discriminator | |
| EMPTY_IA_ARRAY | back to summary |
|---|---|
| pack-priv static InternetAddress[] EMPTY_IA_ARRAY | |
| errorCount | back to summary |
|---|---|
| private int errorCount | |
| eventEvaluator | back to summary |
|---|---|
| protected EventEvaluator<E> eventEvaluator | |
| from | back to summary |
|---|---|
| private String from | |
| jndiLocation | back to summary |
|---|---|
| private String jndiLocation | |
| lastTrackerStatusPrint | back to summary |
|---|---|
| pack-priv long lastTrackerStatusPrint | |
| layout | back to summary |
|---|---|
| protected Layout<E> layout | |
| localhost | back to summary |
|---|---|
| pack-priv String localhost | |
| MAX_DELAY_BETWEEN_STATUS_MESSAGES | back to summary |
|---|---|
| pack-priv static final long MAX_DELAY_BETWEEN_STATUS_MESSAGES | |
| password | back to summary |
|---|---|
| pack-priv String password | |
| session | back to summary |
|---|---|
| protected Session session | |
| sessionViaJNDI | back to summary |
|---|---|
| private boolean sessionViaJNDI | |
| smtpHost | back to summary |
|---|---|
| private String smtpHost | |
| smtpPort | back to summary |
|---|---|
| private int smtpPort | |
| ssl | back to summary |
|---|---|
| private boolean ssl | |
| starttls | back to summary |
|---|---|
| private boolean starttls | |
| subjectLayout | back to summary |
|---|---|
| protected Layout<E> subjectLayout | |
| subjectStr | back to summary |
|---|---|
| private String subjectStr | |
| toPatternLayoutList | back to summary |
|---|---|
| private List<PatternLayoutBase<E>> toPatternLayoutList | |
| username | back to summary |
|---|---|
| pack-priv String username | |
| SMTPAppenderBase | back to summary |
|---|---|
| public SMTPAppenderBase() | |
| addTo | back to summary |
|---|---|
| public void addTo(String to) | |
| append | back to summary |
|---|---|
| protected void append(E eventObject) Implements abstract ch. Perform SMTPAppender specific appending actions, delegating some of them to a subclass and checking if the event triggers an e-mail to be sent. | |
| buildSessionFromProperties | back to summary |
|---|---|
| private Session buildSessionFromProperties() | |
| checkEntryConditions | back to summary |
|---|---|
| public boolean checkEntryConditions() This method determines if there is a sense in attempting to append.
It checks whether there is a set output target and also if there is a set
layout. If these checks fail, then the boolean value | |
| eventMarksEndOfLife | back to summary |
|---|---|
| protected abstract boolean eventMarksEndOfLife(E eventObject) | |
| fillBuffer | back to summary |
|---|---|
| protected abstract void fillBuffer(CyclicBuffer<E> cb, StringBuffer sbuf) | |
| getAddress | back to summary |
|---|---|
| pack-priv InternetAddress getAddress(String addressStr) | |
| getCharsetEncoding | back to summary |
|---|---|
public String getCharsetEncoding()
| |
| getCyclicBufferTracker | back to summary |
|---|---|
| public CyclicBufferTracker | |
| getDiscriminator | back to summary |
|---|---|
| public Discriminator | |
| getFrom | back to summary |
|---|---|
| public String getFrom() Returns value of the From option. | |
| getJndiLocation | back to summary |
|---|---|
| public String getJndiLocation() | |
| getLayout | back to summary |
|---|---|
| public Layout | |
| getLocalhost | back to summary |
|---|---|
| public String getLocalhost() | |
| getPassword | back to summary |
|---|---|
| public String getPassword() | |
| getSMTPHost | back to summary |
|---|---|
| public String getSMTPHost() Alias for getSmtpHost(). | |
| getSmtpHost | back to summary |
|---|---|
| public String getSmtpHost() Returns value of the SMTPHost option. | |
| getSMTPPort | back to summary |
|---|---|
| public int getSMTPPort() Alias for | |
| getSmtpPort | back to summary |
|---|---|
| public int getSmtpPort() See | |
| getSubject | back to summary |
|---|---|
| public String getSubject() Returns value of the Subject option. | |
| getToAsListOfString | back to summary |
|---|---|
| public List | |
| getToList | back to summary |
|---|---|
| public List Returns value of the toList option. | |
| getUsername | back to summary |
|---|---|
| public String getUsername() | |
| isAsynchronousSending | back to summary |
|---|---|
| public boolean isAsynchronousSending() | |
| isSessionViaJNDI | back to summary |
|---|---|
| public boolean isSessionViaJNDI() | |
| isSSL | back to summary |
|---|---|
| public boolean isSSL() | |
| isSTARTTLS | back to summary |
|---|---|
| public boolean isSTARTTLS() | |
| lookupSessionInJNDI | back to summary |
|---|---|
| private Session lookupSessionInJNDI() | |
| makeNewToPatternLayout | back to summary |
|---|---|
| protected abstract PatternLayoutBase | |
| makeSubjectLayout | back to summary |
|---|---|
| protected abstract Layout return a layout for the subject string as appropriate for the module. If the subjectStr parameter is null, then a default value for subjectStr should be used.
| |
| parseAddress | back to summary |
|---|---|
| private List | |
| sendBuffer | back to summary |
|---|---|
| protected void sendBuffer(CyclicBuffer<E> cb, E lastEventObject) Send the contents of the cyclic buffer as an e-mail message.
| |
| setAsynchronousSending | back to summary |
|---|---|
| public void setAsynchronousSending(boolean asynchronousSending) By default, SMTAppender transmits emails asynchronously. For synchronous email transmission set asynchronousSending to 'false'.
| |
| setCharsetEncoding | back to summary |
|---|---|
| public void setCharsetEncoding(String charsetEncoding) Set the character set encoding of the outgoing email messages. The default encoding is "UTF-8" which usually works well for most purposes. | |
| setCyclicBufferTracker | back to summary |
|---|---|
| public void setCyclicBufferTracker(CyclicBufferTracker<E> cbTracker) | |
| setDiscriminator | back to summary |
|---|---|
| public void setDiscriminator(Discriminator<E> discriminator) | |
| setEvaluator | back to summary |
|---|---|
| public void setEvaluator(EventEvaluator<E> eventEvaluator) The EventEvaluator option takes a string value representing the name
of the class implementing the | |
| setFrom | back to summary |
|---|---|
| public void setFrom(String from) The From option takes a string value which should be an e-mail address of the sender. | |
| setJndiLocation | back to summary |
|---|---|
| public void setJndiLocation(String jndiLocation) Set the location where a
| |
| setLayout | back to summary |
|---|---|
| public void setLayout(Layout<E> layout) | |
| setLocalhost | back to summary |
|---|---|
| public void setLocalhost(String localhost) Set the "mail.smtp.localhost" property to the value passed as parameter to this method. Useful in case the hostname for the client host is not fully qualified and as a consequence the SMTP server rejects the clients HELO/EHLO command. | |
| setPassword | back to summary |
|---|---|
| public void setPassword(String password) | |
| setSessionViaJNDI | back to summary |
|---|---|
| public void setSessionViaJNDI(boolean sessionViaJNDI) If set to true, a
| |
| setSMTPHost | back to summary |
|---|---|
| public void setSMTPHost(String smtpHost) Alias for smtpHost | |
| setSmtpHost | back to summary |
|---|---|
| public void setSmtpHost(String smtpHost) The smtpHost option takes a string value which should be the host name of the SMTP server that will send the e-mail message. | |
| setSMTPPort | back to summary |
|---|---|
| public void setSMTPPort(int port) Alias for | |
| setSmtpPort | back to summary |
|---|---|
| public void setSmtpPort(int port) The port where the SMTP server is running. Default value is 25. | |
| setSSL | back to summary |
|---|---|
| public void setSSL(boolean ssl) | |
| setSTARTTLS | back to summary |
|---|---|
| public void setSTARTTLS(boolean startTLS) | |
| setSubject | back to summary |
|---|---|
| public void setSubject(String subject) The Subject option takes a string value which should be the subject of the e-mail message. | |
| setUsername | back to summary |
|---|---|
| public void setUsername(String username) | |
| start | back to summary |
|---|---|
| public void start() Overrides ch. Implements ch. Start the appender | |
| stop | back to summary |
|---|---|
| public synchronized void stop() Overrides ch. Implements ch. | |
| subAppend | back to summary |
|---|---|
| protected abstract void subAppend(CyclicBuffer<E> cb, E eventObject) | |
| updateMimeMsg | back to summary |
|---|---|
| protected void updateMimeMsg(MimeMessage mimeMsg, CyclicBuffer<E> cb, E lastEventObject) Allows to extend classes to update mime message (e.g.: Add headers) | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final CyclicBuffer | |
| pack-priv final E |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void |
| cyclicBuffer | back to summary |
|---|---|
| pack-priv final CyclicBuffer<E> cyclicBuffer | |
| e | back to summary |
|---|---|
| pack-priv final E e | |
| SenderRunnable | back to summary |
|---|---|
| pack-priv SenderRunnable(CyclicBuffer<E> cyclicBuffer, E e) | |
| run | back to summary |
|---|---|
| public void run() Implements java. Doc from java. Runs this operation. | |