mirror of https://github.com/shred/acme4j
Add generateResponse without mail Session
parent
6f0a5c8707
commit
0dff988b26
|
@ -17,11 +17,14 @@ import static java.util.Objects.requireNonNull;
|
|||
import static jakarta.mail.Message.RecipientType.TO;
|
||||
import static org.shredzone.acme4j.smime.email.ResponseBodyGenerator.RESPONSE_BODY_TYPE;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import edu.umd.cs.findbugs.annotations.Nullable;
|
||||
import jakarta.mail.Address;
|
||||
import jakarta.mail.Message;
|
||||
import jakarta.mail.MessagingException;
|
||||
import jakarta.mail.Session;
|
||||
import jakarta.mail.Transport;
|
||||
import jakarta.mail.internet.InternetAddress;
|
||||
import jakarta.mail.internet.MimeMessage;
|
||||
|
||||
|
@ -108,6 +111,18 @@ public class ResponseGenerator {
|
|||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the response email.
|
||||
* <p>
|
||||
* A simple default mail session is used for generation.
|
||||
*
|
||||
* @return Generated {@link Message}.
|
||||
* @since 2.16
|
||||
*/
|
||||
public Message generateResponse() throws MessagingException {
|
||||
return generateResponse(Session.getDefaultInstance(new Properties()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates the response email.
|
||||
* <p>
|
||||
|
|
Loading…
Reference in New Issue