Module org.shredzone.acme4j.smime
Package org.shredzone.acme4j.smime.email
Interface ResponseBodyGenerator
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A generator for the response body to be set to the
Message
.
This generator can be used to design the body of the outgoing response email. However, note that the response email is evaluated by a machine and usually not read by humans, so the design should be kept simple, and must be conformous to RFC-8823.
The responseBody
must be a part of the response email body, otherwise the
validation will fail.
A minimal implementation is:
response.setContent(responseBody, RESPONSE_BODY_TYPE);
- Since:
- 2.12
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
The content-type of the response body: "text/plain" -
Method Summary
Modifier and TypeMethodDescriptionvoid
setContent
(jakarta.mail.Message response, String responseBody) Sets the content of theMessage
.
-
Field Details
-
RESPONSE_BODY_TYPE
The content-type of the response body: "text/plain"- See Also:
-
-
Method Details
-
setContent
void setContent(jakarta.mail.Message response, String responseBody) throws jakarta.mail.MessagingException Sets the content of theMessage
.- Parameters:
response
-Message
to set the body content.responseBody
- The response body that must be part of the email response, and must use "text/plain" content type.- Throws:
jakarta.mail.MessagingException
-