Package de.espirit.firstspirit.access
Class MailHeader.Builder
java.lang.Object
de.espirit.firstspirit.access.MailHeader.Builder
- Enclosing class:
- MailHeader
A builder for creating a new
MailHeader.- Since:
- 5.2.601
-
Method Summary
Modifier and TypeMethodDescription@NotNull MailHeader.BuilderbccRecipient(@NotNull String recipient) Adds one or more blind carbon copy recipients (BCC) to the mail header.@NotNull MailHeader.BuilderccRecipient(@NotNull String recipient) Adds one or more carbon copy recipients (CC) to the mail header.@NotNull MailHeadercreate()Constructs a newMailHeaderwith the values of this builder.@NotNull MailHeader.BuilderAdds one or more recipients (TO) to the mail header.@NotNull MailHeader.BuilderAdds one or more reply-to addresses to the mail header.@NotNull MailHeader.BuilderSets the sender of this mail header.
-
Method Details
-
recipient
Adds one or more recipients (TO) to the mail header.- Parameters:
recipient- The recipient to add. Multiple recipients must be separated by a semicolon. Must not benull.- Returns:
- the builder itself.
- Throws:
IllegalArgumentException- if the domain of a recipient does not conform to RFC 3490- Since:
- 5.2.601
-
ccRecipient
Adds one or more carbon copy recipients (CC) to the mail header.- Parameters:
recipient- The carbon copy recipient to add. Multiple recipients must be separated by a semicolon. Must not benull.- Returns:
- the builder itself.
- Throws:
IllegalArgumentException- if the domain of a recipient does not conform to RFC 3490- Since:
- 5.2.220702
-
bccRecipient
Adds one or more blind carbon copy recipients (BCC) to the mail header.- Parameters:
recipient- The blind carbon copy recipient to add. Multiple recipients must be separated by a semicolon. Must not benull.- Returns:
- the builder itself.
- Throws:
IllegalArgumentException- if the domain of a recipient does not conform to RFC 3490- Since:
- 5.2.220702
-
sender
Sets the sender of this mail header. If a sender has been specified earlier for this builder, it is replaced.- Parameters:
sender- The sender to set, must not benull.- Returns:
- the builder itself.
- Throws:
IllegalArgumentException- if the domain of a recipient does not conform to RFC 3490- Since:
- 5.2.601
-
replyTo
Adds one or more reply-to addresses to the mail header.- Parameters:
replyTo- The reply-to address to add. Multiple addresses must be separated by a semicolon. Must not benull.- Returns:
- the builder itself.
- Throws:
IllegalArgumentException- if the domain of a recipient does not conform to RFC 3490- Since:
- 5.2.601
-
create
Constructs a newMailHeaderwith the values of this builder.- Returns:
- The mail header containing the values specified for the builder, never
null. - Since:
- 5.2.601
-