Package | Description |
---|---|
org.simplejavamail.api.email | |
org.simplejavamail.api.mailer | |
org.simplejavamail.api.mailer.config | |
org.simplejavamail.converter | |
org.simplejavamail.email | |
org.simplejavamail.mailer |
Modifier and Type | Method and Description |
---|---|
Email |
EmailPopulatingBuilder.buildEmail()
Validated DKIM values and then delegates to
Email(EmailPopulatingBuilder) with this as argument. |
Email |
EmailPopulatingBuilder.buildEmailCompletedWithDefaultsAndOverrides()
Delegates to
EmailPopulatingBuilder.buildEmailCompletedWithDefaultsAndOverrides(EmailGovernance) with an empty default email governance, which
will still apply default config (System) properties (files). |
Email |
EmailPopulatingBuilder.buildEmailCompletedWithDefaultsAndOverrides(@NotNull EmailGovernance emailGovernance)
Like
EmailPopulatingBuilder.buildEmail() , but returning the final email version right away. |
@Nullable Email |
EmailPopulatingBuilder.getSmimeSignedEmail()
If the Email instance currently being built was the result of a conversion in which the source message was S/MIME
signed / encrypted, this field will contain the decrypted MimeMessage instance.
|
@Nullable Email |
Email.getSmimeSignedEmail() |
Modifier and Type | Method and Description |
---|---|
EmailPopulatingBuilder |
EmailStartingBuilder.copying(@NotNull Email email)
Preconfigures the builder with all the properties from the given email that are non-null.
|
static boolean |
EqualsHelper.equalsEmail(Email email1,
Email email2) |
EmailPopulatingBuilder |
EmailStartingBuilder.forwarding(@NotNull Email email)
Delegates to
EmailStartingBuilder.forwarding(MimeMessage) with the provided Email converted to MimeMessage . |
EmailPopulatingBuilder |
EmailStartingBuilder.replyingTo(@NotNull Email email)
Delegates to
EmailStartingBuilder.replyingTo(MimeMessage, boolean, String) with replyToAll set to false and a default HTML quoting
template. |
EmailPopulatingBuilder |
EmailStartingBuilder.replyingTo(@NotNull Email email,
@NotNull String customQuotingTemplate)
Delegates to
EmailStartingBuilder.replyingTo(MimeMessage, boolean, String) with replyToAll set to false . |
EmailPopulatingBuilder |
EmailStartingBuilder.replyingToAll(@NotNull Email email)
Delegates to
EmailStartingBuilder.replyingTo(MimeMessage, boolean, String) with replyToAll set to true and a default HTML quoting
template. |
EmailPopulatingBuilder |
EmailStartingBuilder.replyingToAll(@NotNull Email email,
@NotNull String customQuotingTemplate)
Delegates to
EmailStartingBuilder.replyingTo(MimeMessage, boolean, String) with replyToAll set to true . |
Modifier and Type | Method and Description |
---|---|
@Nullable Email |
MailerGenericBuilder.getEmailDefaults() |
@Nullable Email |
MailerGenericBuilder.getEmailOverrides() |
Modifier and Type | Method and Description |
---|---|
@NotNull CompletableFuture<Void> |
Mailer.sendMail(Email email)
Delegates to
Mailer.sendMail(Email, boolean) , with async = false . |
@NotNull CompletableFuture<Void> |
Mailer.sendMail(Email email,
boolean async)
Processes an
Email instance into a completely configured Message . |
void |
CustomMailer.sendMessage(@NotNull OperationalConfig operationalConfig,
@NotNull jakarta.mail.Session session,
@NotNull Email email,
@NotNull jakarta.mail.internet.MimeMessage message) |
boolean |
Mailer.validate(Email email)
Validates an
Email instance. |
T |
MailerGenericBuilder.withEmailDefaults(@NotNull Email emailDefaults)
Sets a reference
Email to be used for default values on all emails coming through this Mailer instance. |
T |
MailerGenericBuilder.withEmailOverrides(@NotNull Email emailoverrides)
Sets a reference
Email to be used for default values on all emails coming through this Mailer instance. |
Modifier and Type | Method and Description |
---|---|
@NotNull Email |
EmailGovernance.produceEmailApplyingDefaultsAndOverrides(@Nullable Email provided)
This method will apply the defaults and overrides to the given email and return the result as a new instance.
|
Modifier and Type | Method and Description |
---|---|
@NotNull Email |
EmailGovernance.produceEmailApplyingDefaultsAndOverrides(@Nullable Email provided)
This method will apply the defaults and overrides to the given email and return the result as a new instance.
|
Modifier and Type | Method and Description |
---|---|
static @NotNull Email |
EmailConverter.emlToEmail(@NotNull File emlFile)
Delegates to
EmailConverter.emlToEmail(File, Pkcs12Config) . |
static @NotNull Email |
EmailConverter.emlToEmail(@NotNull File emlFile,
@Nullable Pkcs12Config pkcs12Config)
Delegates to
EmailConverter.emlToEmailBuilder(File, Pkcs12Config) . |
static @NotNull Email |
EmailConverter.emlToEmail(@NotNull InputStream emlInputStream)
Delegates to
EmailConverter.emlToEmail(InputStream, Pkcs12Config) . |
static @NotNull Email |
EmailConverter.emlToEmail(@NotNull InputStream emlInputStream,
@Nullable Pkcs12Config pkcs12Config)
Delegates to
EmailConverter.emlToEmailBuilder(InputStream, Pkcs12Config) with the full string value read from the given InputStream . |
static @NotNull Email |
EmailConverter.emlToEmail(@NotNull String eml)
Delegates to
EmailConverter.emlToEmail(String, Pkcs12Config) . |
static @NotNull Email |
EmailConverter.emlToEmail(@NotNull String eml,
@Nullable Pkcs12Config pkcs12Config)
Delegates to
EmailConverter.emlToEmailBuilder(String, Pkcs12Config) . |
static @NotNull Email |
EmailConverter.mimeMessageToEmail(@NotNull jakarta.mail.internet.MimeMessage mimeMessage)
|
static @NotNull Email |
EmailConverter.mimeMessageToEmail(@NotNull jakarta.mail.internet.MimeMessage mimeMessage,
@Nullable Pkcs12Config pkcs12Config)
|
static @NotNull Email |
EmailConverter.mimeMessageToEmail(@NotNull jakarta.mail.internet.MimeMessage mimeMessage,
@Nullable Pkcs12Config pkcs12Config,
boolean fetchAttachmentData)
|
static @NotNull Email |
EmailConverter.outlookMsgToEmail(@NotNull File msgFile)
Delegates to
EmailConverter.outlookMsgToEmailBuilder(File) and then builds and returns the email. |
static @NotNull Email |
EmailConverter.outlookMsgToEmail(@NotNull File msgFile,
@Nullable Pkcs12Config pkcs12Config)
Delegates to
EmailConverter.outlookMsgToEmailBuilder(File, Pkcs12Config) and then builds and returns the email. |
static @NotNull Email |
EmailConverter.outlookMsgToEmail(@NotNull InputStream msgInputStream)
|
static @NotNull Email |
EmailConverter.outlookMsgToEmail(@NotNull InputStream msgInputStream,
@Nullable Pkcs12Config pkcs12Config)
|
static @NotNull Email |
EmailConverter.outlookMsgToEmail(@NotNull String msgData)
Delegates to
EmailConverter.outlookMsgToEmail(String, Pkcs12Config) . |
static @NotNull Email |
EmailConverter.outlookMsgToEmail(@NotNull String msgData,
@Nullable Pkcs12Config pkcs12Config) |
Modifier and Type | Method and Description |
---|---|
static String |
EmailConverter.emailToEML(@NotNull Email email)
Delegates to
EmailConverter.emailToMimeMessage(Email) and passes the result to EmailConverter.mimeMessageToEML(MimeMessage) . |
static jakarta.mail.internet.MimeMessage |
EmailConverter.emailToMimeMessage(@NotNull Email email)
Delegates to
EmailConverter.emailToMimeMessage(Email, Session, EmailGovernance) , using a new empty Session instance,
and without email governance - but defaults from (system) prorties (files) are still applied, if provided.. |
static jakarta.mail.internet.MimeMessage |
EmailConverter.emailToMimeMessage(@NotNull Email email,
EmailGovernance emailGovernance)
Delegates to
EmailConverter.emailToMimeMessage(Email, Session, EmailGovernance) , using a new empty Session instance. |
static jakarta.mail.internet.MimeMessage |
EmailConverter.emailToMimeMessage(@NotNull Email email,
@NotNull jakarta.mail.Session session)
Delegates to
EmailConverter.emailToMimeMessage(Email, Session, EmailGovernance) with no email governance -
but defaults from (system) prorties (files) are still applied, if provided. |
static jakarta.mail.internet.MimeMessage |
EmailConverter.emailToMimeMessage(@NotNull Email email,
@NotNull jakarta.mail.Session session,
@NotNull EmailGovernance emailGovernance)
Delegates to
MimeMessageProducerHelper.produceMimeMessage(Email, Session) . |
Modifier and Type | Method and Description |
---|---|
static EmailPopulatingBuilder |
EmailBuilder.copying(@NotNull Email email)
Delegates to
EmailStartingBuilder.copying(Email) . |
static EmailPopulatingBuilder |
EmailBuilder.forwarding(@NotNull Email email)
Delegates to
EmailStartingBuilder.forwarding(Email) . |
static EmailPopulatingBuilder |
EmailBuilder.replyingTo(@NotNull Email email)
Delegates to
EmailStartingBuilder.replyingTo(Email) . |
static EmailPopulatingBuilder |
EmailBuilder.replyingTo(@NotNull Email email,
@NotNull String customQuotingTemplate)
Delegates to
EmailStartingBuilder.replyingTo(Email, String) . |
static EmailPopulatingBuilder |
EmailBuilder.replyingToAll(@NotNull Email email)
Delegates to
EmailStartingBuilder.replyingToAll(Email) . |
static EmailPopulatingBuilder |
EmailBuilder.replyingToAll(@NotNull Email email,
@NotNull String customQuotingTemplate)
Delegates to
EmailStartingBuilder.replyingToAll(Email, String) . |
Modifier and Type | Method and Description |
---|---|
static void |
MailerHelper.scanForInjectionAttacks(@NotNull Email email)
Checks the following headers for suspicious content (newlines and characters):
subject
every header name and value
every attachment name, nested datasource name and description
every embedded image name, nested datasource name and description
from recipient name and address
replyTo recipient name and address, if provided
bounceTo recipient name and address, if provided
every TO/CC/BCC recipient name and address
disposition-notification-to recipient name and address, if provided
return-receipt-to recipient name and address, if provided
|
static jakarta.mail.internet.MimeMessage |
MailerHelper.signAndOrEncryptMessageWithSmime(@NotNull jakarta.mail.Session session,
@NotNull jakarta.mail.internet.MimeMessage messageToProtect,
@NotNull Email emailContainingSmimeDetails)
Depending on the Email configuration, signs and then encrypts message (both steps optional), using the S/MIME module.
|
static jakarta.mail.internet.MimeMessage |
MailerHelper.signMessageWithDKIM(@NotNull jakarta.mail.internet.MimeMessage messageToSign,
@NotNull Email emailContainingSigningDetails) |
static boolean |
MailerHelper.validate(@NotNull Email email)
Delegates to #validate(Email, EmailValidator) with a null validator.
|
static boolean |
MailerHelper.validate(@NotNull Email email,
@Nullable com.sanctionco.jmail.EmailValidator emailValidator)
Delegates to all other validations for a full checkup.
|
static void |
MailerHelper.validateAddresses(@NotNull Email email,
@Nullable com.sanctionco.jmail.EmailValidator emailValidator)
If email validator is provided, checks:
from recipient
all TO/CC/BCC recipients
reply-to recipient, if provided
bounce-to recipient, if provided
disposition-notification-to recipient, if provided
return-receipt-to recipient, if provided
|
static void |
MailerHelper.validateCompleteness(@NotNull Email email)
Checks whether the following RFC 5322 mandatory properties are present:
there are recipients
if there is a sender
|
static boolean |
MailerHelper.validateLenient(@NotNull Email email)
Delegate to #validateLenient(Email, EmailValidator) with a null validator.
|
static boolean |
MailerHelper.validateLenient(@NotNull Email email,
@Nullable com.sanctionco.jmail.EmailValidator emailValidator)
Lenient validation only checks for missing fields (which implies incorrect configuration or missing data),
but only warns for invalid address and suspected CRLF injections.
|
Copyright © 2009–2024. All rights reserved.