public static class MailHeader.Builder extends Object
MailHeader
.Modifier and Type | Method and Description |
---|---|
MailHeader |
create()
Constructs a new
MailHeader with the values of this builder. |
MailHeader.Builder |
recipient(String recipient)
Adds one or more recipients to the mail header.
|
MailHeader.Builder |
replyTo(String replyTo)
Adds one or more reply-to addresses to the mail header.
|
MailHeader.Builder |
sender(String sender)
Sets the sender of this mail header.
|
public MailHeader.Builder recipient(@NotNull String recipient)
recipient
- The recipient to add. Multiple recipients must be separated by a semicolon.
Must not be null
.IllegalArgumentException
- if the domain of a recipient does not conform to RFC 3490public MailHeader.Builder sender(@NotNull String sender)
sender
- The sender to set, must not be null
.IllegalArgumentException
- if the domain of a recipient does not conform to RFC 3490public MailHeader.Builder replyTo(@NotNull String replyTo)
replyTo
- The reply-to address to add. Multiple addresses must be separated by a semicolon.
Must not be null
.IllegalArgumentException
- if the domain of a recipient does not conform to RFC 3490@NotNull public MailHeader create()
MailHeader
with the values of this builder.null
.Copyright © 2021 e-Spirit AG. All Rights Reserved. Build 5.2.210210