Package org.apache.logging.log4j.smtp
Class MimeMessageBuilder
java.lang.Object
org.apache.logging.log4j.smtp.MimeMessageBuilder
- All Implemented Interfaces:
Builder<jakarta.mail.internet.MimeMessage>
public class MimeMessageBuilder
extends Object
implements Builder<jakarta.mail.internet.MimeMessage>
Builder for
MimeMessage instances.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.internet.MimeMessagebuild()Builds the object after all configuration has been set.setRecipients(jakarta.mail.Message.RecipientType recipientType, String recipients) setReplyTo(String replyTo) setSubject(String subject) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.util.Builder
getErrorPrefix, isValid
-
Constructor Details
-
MimeMessageBuilder
public MimeMessageBuilder(jakarta.mail.Session session)
-
-
Method Details
-
setFrom
- Throws:
jakarta.mail.MessagingException
-
setReplyTo
- Throws:
jakarta.mail.MessagingException
-
setRecipients
public MimeMessageBuilder setRecipients(jakarta.mail.Message.RecipientType recipientType, String recipients) throws jakarta.mail.MessagingException - Throws:
jakarta.mail.MessagingException
-
setSubject
- Throws:
jakarta.mail.MessagingException
-
build
public jakarta.mail.internet.MimeMessage build()Description copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.
-