public class SmtpManager extends MailManager
Modifier and Type | Class and Description |
---|---|
static class |
SmtpManager.SMTPManagerFactory
Factory to create the SMTP Manager.
|
MailManager.FactoryData
AbstractManager.AbstractFactoryData
count, LOGGER
Modifier | Constructor and Description |
---|---|
protected |
SmtpManager(String name,
jakarta.mail.Session session,
jakarta.mail.internet.MimeMessage message,
MailManager.FactoryData data) |
Modifier and Type | Method and Description |
---|---|
void |
add(LogEvent event) |
protected void |
encodeContent(byte[] bytes,
String encoding,
ByteArrayOutputStream out) |
protected byte[] |
encodeContentToBytes(byte[] rawBytes,
String encoding) |
protected byte[] |
formatContentToBytes(LogEvent[] priorEvents,
LogEvent appendEvent,
Layout<?> layout) |
protected String |
getEncoding(byte[] rawBytes,
String contentType) |
protected jakarta.mail.internet.InternetHeaders |
getHeaders(String contentType,
String encoding) |
protected jakarta.mail.internet.MimeMultipart |
getMimeMultipart(byte[] encodedBytes,
jakarta.mail.internet.InternetHeaders headers) |
void |
sendEvents(Layout<?> layout,
LogEvent appendEvent) |
protected void |
sendMultipartMessage(jakarta.mail.internet.MimeMessage msg,
jakarta.mail.internet.MimeMultipart mp)
Deprecated.
Please use the
sendMultipartMessage(MimeMessage, MimeMultipart, String) method instead. |
protected void |
sendMultipartMessage(jakarta.mail.internet.MimeMessage msg,
jakarta.mail.internet.MimeMultipart mp,
String subject) |
protected void |
writeBuffer(LogEvent[] priorEvents,
LogEvent appendEvent,
Layout<?> layout,
OutputStream out) |
protected void |
writeFooter(Layout<?> layout,
OutputStream out) |
protected void |
writeHeader(Layout<?> layout,
OutputStream out) |
close, getContentFormat, getCount, getLoggerContext, getManager, getName, getStrSubstitutor, hasManager, log, logDebug, logError, logger, logWarn, narrow, release, releaseSub, stop, updateData
protected SmtpManager(String name, jakarta.mail.Session session, jakarta.mail.internet.MimeMessage message, MailManager.FactoryData data)
public void add(LogEvent event)
add
in class MailManager
public void sendEvents(Layout<?> layout, LogEvent appendEvent)
sendEvents
in class MailManager
protected byte[] formatContentToBytes(LogEvent[] priorEvents, LogEvent appendEvent, Layout<?> layout) throws IOException
IOException
protected void writeHeader(Layout<?> layout, OutputStream out) throws IOException
IOException
protected void writeBuffer(LogEvent[] priorEvents, LogEvent appendEvent, Layout<?> layout, OutputStream out) throws IOException
IOException
protected void writeFooter(Layout<?> layout, OutputStream out) throws IOException
IOException
protected byte[] encodeContentToBytes(byte[] rawBytes, String encoding) throws jakarta.mail.MessagingException, IOException
jakarta.mail.MessagingException
IOException
protected void encodeContent(byte[] bytes, String encoding, ByteArrayOutputStream out) throws jakarta.mail.MessagingException, IOException
jakarta.mail.MessagingException
IOException
protected jakarta.mail.internet.InternetHeaders getHeaders(String contentType, String encoding)
protected jakarta.mail.internet.MimeMultipart getMimeMultipart(byte[] encodedBytes, jakarta.mail.internet.InternetHeaders headers) throws jakarta.mail.MessagingException
jakarta.mail.MessagingException
@Deprecated protected void sendMultipartMessage(jakarta.mail.internet.MimeMessage msg, jakarta.mail.internet.MimeMultipart mp) throws jakarta.mail.MessagingException
sendMultipartMessage(MimeMessage, MimeMultipart, String)
method instead.jakarta.mail.MessagingException
protected void sendMultipartMessage(jakarta.mail.internet.MimeMessage msg, jakarta.mail.internet.MimeMultipart mp, String subject) throws jakarta.mail.MessagingException
jakarta.mail.MessagingException
Copyright © 1999-2022 The 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.