amail.cli-module.8.12.3.source-code.cli.data Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cli-module Show documentation
Show all versions of cli-module Show documentation
Simple API, Complex Emails. Now with CLI support
java.util.ArrayLis??org.simplejavamail.api.internal.clisupport.model.CliDeclaredOptionSpe? ? ?Dictates whether sources will be resolved for embedded images when they are not nested under the baseClassPath (if baseClassPath is set).?--email:allowingEmbeddedImageOutsideBaseClassPath ?org.simplejavamail.api.internal.clisupport.model.CliDeclaredOptionValu? ?Whether image sources should be resolved that reside outside the baseClassPath (if set)BOO̧allowEmbeddedImageOutsideBaseClassPath org.simplejavamail.api.email.EmailPopulatingBuilde? ??allowingEmbeddedImageOutsideBaseClassPath ??allowingEmbeddedImageOutsideBaseClassPath H H ? ?Dictates whether files will be resolved for embedded images when they are not nested under the baseDir (if baseDir is set).?--email:allowingEmbeddedImageOutsideBaseDir ? ?Whether files should be resolved that reside outside the baseDir (if set)BOO?allowEmbeddedImageOutsideBaseDi? ??allowingEmbeddedImageOutsideBaseDir ??allowingEmbeddedImageOutsideBaseDir F F ? ?Dictates whether url's will be resolved for embedded images when they are not nested under the baseUrl (if baseUrl is set).?--email:allowingEmbeddedImageOutsideBaseUrl ? ?Whether url's should be resolved that reside outside the baseUrl (if set)BOO?allowEmbeddedImageOutsideBaseUr? ??allowingEmbeddedImageOutsideBaseUrl ??allowingEmbeddedImageOutsideBaseUrl J J ? ?Appends text to the current plain text body (or starts it if plain text body is missing).--email:appendTex? ? ?The plain text to append to whatever plain text is already there.TEX?tex? ?appendTex? ?appendTex? 4 4 ? ?Delegates to @|cyan --email:appendText|@ (see below).?
@|bold -> --email:appendText text(=TEXT)|@:
Appends text to the current plain text body (or starts it if plain text body is missing).--email:appendTextFromFil? ? ?The plain text to append to whatever plain text is already there.FIL?textFil? s 8 ?appendTex? java.io.Fil? s 8 ?appendTex? 6 6 ? ?Appends HTML text to the current HTML text body (or starts it if HTML text body is missing).--email:appendTextHTM? ? ?The HTML text to append to whatever is already there in the body.TEX?textHTM? ?appendTextHTM? ?appendTextHTM? ? ? ? ?Delegates to @|cyan --email:appendTextHTML|@ (see below).?
@|bold -> --email:appendTextHTML textHTML(=TEXT)|@:
Appends HTML text to the current HTML text body (or starts it if HTML text body is missing).--email:appendTextHTMLFromFil? ? ?The HTML text to append to whatever is already there in the body.FIL?textHTMLFil? s > ?appendTextHTM? s > ?appendTextHTM? ? ? ? ?Delegates to @|green withRecipients(String, boolean, Collection, Message.RecipientType)|@, with @|green recipientType=|@@|green Message.RecipientType.BCC|@ and @|green fixedName=true|@ assigning or overwriting existing names with the provided name.--email:bc? ? ?The optional name of the BCC receiver(s) of the email. If multiples addresses are provided, all addresses will be in this same name.TEX?nam? ?Single RFC2822 address or delimited list of RFC2822 addresses of BCC receiver(s). Any names included are ignored if a name was provided.[email protected]??Lolly Pop?Moonpie ;Daisy [email protected],[email protected],[email protected]?TEX?oneOrMoreAddresse? ?bc?
$ ?bc?
$ \ \ ? ?Delegates to @|green withRecipients(String, boolean, Collection, Message.RecipientType)|@, with @|green recipientType=|@@|green Message.RecipientType.CC|@ and @|green fixedName=true|@ assigning or overwriting existing names with the provided name.--email:c? ? ?The optional name of the CC receiver(s) of the email. If multiples addresses are provided, all addresses will be in this same name.TEX?nam? ?Single RFC2822 address or delimited list of RFC2822 addresses of CC receiver(s). Any names included are ignored if a name was provided.[email protected]??Lolly Pop?Moonpie ;Daisy [email protected],[email protected],[email protected]?TEX?oneOrMoreAddresse? ?c?
$ ?c?
$ 0 0 ? ?Resets @|italic attachments|@ to empty.--email:clearAttachment? ?clearAttachment? ?clearAttachment? ? ? ? ?Resets @|italic bounceToRecipient|@ to empty.--email:clearBounceT? ?clearBounceT? ?clearBounceT? ? ? ? ?Resets @|italic calendarText|@ to empty.--email:clearCalendarTex? ?clearCalendarTex? ?clearCalendarTex? ? ? ? ?Resets @|italic contentTransferEncoding|@ to @|green ContentTransferEncoding.QUOTED_PRINTABLE|@.?--email:clearContentTransferEncoding ?clearContentTransferEncodin? ?clearContentTransferEncodin? ? ? ? ?Resets @|italic dispositionNotificationTo|@ to empty.?--email:clearDispositionNotificationTo ?clearDispositionNotificationT? ?clearDispositionNotificationT? ? ? ? ?Resets all dkim properties to empty.?
@|bold Note:|@ this only works in combination with the @|green DKIM module|@.--email:clearDki? ?clearDki? ?clearDki? ? ? ? ?Resets classpath base for embedded images to @|green null|@.?--email:clearEmbeddedImageBaseClassPath ?clearEmbeddedImageBaseClassPat? ?clearEmbeddedImageBaseClassPat? ? ? ? ?Resets base dir for embedded images to @|green null|@.?--email:clearEmbeddedImageBaseDir ?clearEmbeddedImageBaseDi? ?clearEmbeddedImageBaseDi? ? ? ? ?Resets base URL for embedded images to @|green null|@.?--email:clearEmbeddedImageBaseUrl ?clearEmbeddedImageBaseUr? ?clearEmbeddedImageBaseUr? ? ? ? ?Resets @|italic embeddedImages|@ to empty.--email:clearEmbeddedImage? ?clearEmbeddedImage? ?clearEmbeddedImage? ? ? ? ?Resets @|italic fromRecipient|@ to empty.--email:clearFromRecipien? ?clearFromRecipien? ?clearFromRecipien? ? ? ? ?Resets @|italic textHTML|@ to empty.--email:clearHTMLTex? ?clearHTMLTex? ?clearHTMLTex? ? ? ? ?Resets @|italic headers|@ to empty.--email:clearHeader? ?clearHeader? ?clearHeader? ? ? ? Resets @|italic id|@ to empty?--email:clearI? ?clearI? ?clearI? ? ? ? ?Resets @|italic overrideReceivers|@ to empty.--email:clearOverrideReceiver? ?clearOverrideReceiver? ?clearOverrideReceiver? ? ? ? Resets @|italic text|@ to empty?--email:clearPlainTex? ?clearPlainTex? ?clearPlainTex? ? ? ? ?Resets @|italic recipients|@ to empty.--email:clearRecipient? ?clearRecipient? ?clearRecipient? ? ? ? ?Resets @|italic replyToRecipients|@ to empty.--email:clearReplyT? ?clearReplyT? ?clearReplyT? ? ? ? ?Resets @|italic returnReceiptTo|@ to empty.--email:clearReturnReceiptT? ?clearReturnReceiptT? ?clearReturnReceiptT? ? ? ? ?When readig and converting an email, this flag makes the behavior revert to the default merging behavior for single S/MIME signed attachments, which is that it @|italic is|@ merged into the root message.?
This can be useful when copying an @|green Email|@ that @|italic was|@ merged (default behavior), to unmerge it.
@|bold Note:|@ this only works in combination with the @|green S/MIME module|@.?--email:clearSMIMESignedAttachmentMergingBehavior ??clearSMIMESignedAttachmentMergingBehavior ??clearSMIMESignedAttachmentMergingBehavior ? ? ? ?Clears the fixed @|italic sent-date|@ so that the current date is used again at the time of sending.--email:clearSentDat? ?clearSentDat? ?clearSentDat? ? ? ? ?For signing and encrypting this email when sending, resets all S/MIME properties to empty.?
@|bold Note:|@ this only works in combination with the @|green S/MIME module|@.--email:clearSmim? ?clearSmim? ?clearSmim? ? ? ? ?Resets @|italic subject|@ to empty.--email:clearSubjec? ?clearSubjec? ?clearSubjec? ? ? ? ?Delegates to java-only method @|italic,faint copying(Email)|@ (see below), by converting the provided message first.?
@|bold -> copying(Email)|@:%n Preconfigures the builder with all the properties from the given email that are non-null.--email:copyin? ? ?The MimeMessage email to convert and copy to new @|green Email|@.EML FIL?messag? org.simplejavamail.api.email.EmailStartingBuilde? ?copyin? jakarta.mail.internet.MimeMessag? ?copyin? ? ?When embedded image auto resolution is enabled, this option will make sure unresolved images sources result in an exception.?
Not using this option effectively means a more lenient approach to image sources.
Note: It also allows you to work with URL's as image sources that can't be resolved at time of sending, but that makes sense when viewing the email in some client (e.g. relative url's).?--email:embeddedImageAutoResolutionMustBeSuccesful ? ?Whether auto resolution is enforced and bubbles up failure to do so.BOO̫embeddedImageAutoResolutionMustBeSuccesful ??embeddedImageAutoResolutionMustBeSuccesful ??embeddedImageAutoResolutionMustBeSuccesful 8 8 ? ?Delegates to java-only method @|italic,faint encryptWithSmime(SmimeEncryptionConfig)|@ (see below) using the provided PEM file.?
@|bold Note:|@ this only works in combination with the @|green S/MIME module|@.
@|bold -> encryptWithSmime(SmimeEncryptionConfig)|@:%n Encrypts this email with a X509 certificate according to the S/MIME spec (https://tools.ietf.org/html/rfc5751) signature.
You can sign this email with the public key you received from your recipient. The recipient then is the only person that can decrypt the email with his or her private key.
@|bold Note:|@ this only works in combination with the @|green S/MIME module|@.--email:encryptWithSmim? ? ?The recipient's public key to use for encryption.FIL?pemFil??The key encapsulation algorithm to use for encryption. See @|green SmimeEncryptionConfig|@ for available values.TEX?keyEncapsulationAlgorith? ?The cipher algorithm to use for encryption. See @|green SmimeEncryptionConfig|@ for available values.TEX?cipherAlgorith? ?encryptWithSmim? $ $ ?encryptWithSmim? $ $ ? ? ? ?Sets optional ID to a fixed value, which is otherwise generated by the underlying JavaMail framework when sending the email.?
@|bold Note 1:|@ ID is user-controlled. Only when converting an email, Simple Java Mail might fill the sent-date.
@|bold Note 2:|@ The id-format should conform to rfc5322#section-3.6.4 (https://tools.ietf.org/html/rfc5322#section-3.6.4)--email:fixingMessageI? ? The mime message id?@|green <123@456>|?TEX?i? ?fixingMessageI? $ ?fixingMessageI? $ ? ? ? ?When an email is sent it is converted to a MimeMessage at which time the sent-date is filled with the current date. With this method this can be fixed to a date of choice.?
@|bold Note:|@ the @|italic sent|@ date is user-controlled. Only when converting an email, Simple Java Mail might fill the sent-date.--email:fixingSentDat? ? The date to use as sent date?yyyy-[M]M-[d]d[ HH:mm?sentDat? ?fixingSentDat? java.util.Dat? ?fixingSentDat? ? ? ? ?Primes the email to be build with proper subject and include the forwarded email as "message/rfc822" bodypart (valid RFC forward).?
@|bold Note 1|@: replaces subject with "Fwd: " (nesting enabled).
@|bold Note 2|@: @|green Content-Disposition|@ will be left empty so the receiving email client can decide how to handle display (most will show inline, some will show as attachment instead).--email:forwardin? ? ?The message to be included in the new forwarding email.EML FIL?messag? ?forwardin? ?forwardin? ? ?Delegates to java-only method @|italic,faint from(Recipient)|@ (see below) with a new @|green Recipient|@ wrapped around the given name and email address.?
@|bold -> from(Recipient)|@:%n Sets the address of the sender of this email with given @|green Recipient|@ (ignoring its @|green Message.RecipientType|@ if provided).
Can be used in conjunction with one of the @|green replyTo(...)|@ methods, which is then prioritized by email clients when replying to this email.--email:fro? ? ?The name that will be visible to the receivers of this email.TEX?nam? ?The address that will be visible to the receivers of this email.TEX?fromAddres? ?fro? $ ?fro? $ ? ?Configures this builder to create an email ignoring the all defaults from (System) properties, config files or defaults email on Mailer level in the @|green org.simplejavamail.api.mailer.config.EmailGovernance|@. You can make individual exceptions with * java-only method @|italic,faint dontApplyDefaultValueFor(EmailProperty[])|@?@|bold Note:|@ This is irrelevant for Email instances used to set on @|green org.simplejavamail.api.mailer.config.EmailGovernance|@ as defaults or overrides reference.--email:ignoringDefault? ?ignoringDefault? ?ignoringDefault? ? ?Indicates that when the email is sent, no default values whatsoever should be applied to the email.--email:ignoringDefaultsYesN? ? ?Whether to ignore all default values or not for this email.BOO?ignoreDefault? s ?ignoringDefault? s ?ignoringDefault? ? ? ? ?Configures this builder to create an email ignoring the all overrides from (System) properties, config files or defaults email on Mailer level in the @|green org.simplejavamail.api.mailer.config.EmailGovernance|@. You can make individual exceptions with java-only method @|italic,faint dontApplyOverrideValueFor(EmailProperty[])|@?@|bold Note:|@ This is irrelevant for Email instances used to set on @|green org.simplejavamail.api.mailer.config.EmailGovernance|@ as defaults or overrides reference.--email:ignoringOverride? ?ignoringOverride? ?ignoringOverride? ? ?Indicates that when the email is sent, no override values whatsoever should be applied to the email.--email:ignoringOverridesYesN? ? ?Whether to ignore all overrides values or not for this email.BOO?ignoreOverride? s ?ignoringOverride? s ?ignoringOverride? n n ? ?When the S/MIME module is loaded, S/MIME signed / encrypted attachments are decrypted and kept in a separate list. However, if it is a single attachment and the actual attachment has mimetype "message/rfc822", it is assumed to be the message itself and by default will be merged with the top level email (basically overriding body, headers and attachments).?This API disables this behavior and stricly keeps all attachments as-is (still decrypted, but not merged with the email).
@|bold Note:|@ this only works in combination with the @|green S/MIME module|@.?--email:notMergingSingleSMIMESignedAttachment ??notMergingSingleSMIMESignedAttachment ??notMergingSingleSMIMESignedAttachment j j ? ?Prepends text to the current plain text body (or starts it if plain text body is missing).--email:prependTex? ? ?The plain text to prepend to whatever plain text is already there.TEX?tex? ?prependTex? ?prependTex? ? ? ? ?Delegates to @|cyan --email:prependText|@ (see below).?
@|bold -> --email:prependText text(=TEXT)|@:
Prepends text to the current plain text body (or starts it if plain text body is missing).--email:prependTextFromFil? ? ?The plain text to prepend to whatever plain text is already there.FIL?textFil? s 6 ?prependTex? s 6 ?prependTex? ? ? ? ?Prepends HTML text to the current HTML text body (or starts it if HTML text body is missing).--email:prependTextHTM? ? ?The HTML text to prepend to whatever is already there in the body.TEX?textHTM? ?prependTextHTM? ?prependTextHTM? ? ? ? ?Delegates to @|cyan --email:prependTextHTML|@ (see below).?
@|bold -> --email:prependTextHTML textHTML(=TEXT)|@:
Prepends HTML text to the current HTML text body (or starts it if HTML text body is missing).--email:prependTextHTMLFromFil? ? ?The HTML text to prepend to whatever is already there in the body.FIL?textHTMLFil? s < ?prependTextHTM? s < ?prependTextHTM? ? ? ? ?Primes the email with subject, quoted content, headers, originally embedded images and recipients needed for a valid RFC reply.?
@|bold Note 1:|@ replaces subject with "Re: " (but never nested).
@|bold Note 2:|@ always sets both plain text and HTML text, so if you update the content body, be sure to update HTML as well.
@|bold Note 3:|@ sets body content: text is replaced with @|green "> text"|@ and HTML is replaced with the provided (or default) quoting markup (add your own content with @|cyan --email:prependText|@ and @|cyan --email:prependTextHTML|@).--email:replyingT? ? ?The message from which we harvest recipients, original content to quote (including embedded images), message ID to include.EML FIL?emailMessag??Indicates whether all original receivers should be included in this new reply. Also see @|green MimeMessage.reply(boolean)|@.BOO?repyToAl??HTML quoting template that should be used in the reply. Should contain the substring @|green "%%s"|@. Be advised that HTML is very limited in emails.TEX?htmlTemplat? ?replyingT? ?replyingT? ? ?Delegates to @|cyan --email:replyingTo|@ (see below) with replyToAll set to @|green true|@.?
@|bold -> --email:replyingTo emailMessage(=EML FILE) repyToAll(=BOOL) htmlTemplate(=TEXT)|@:
Primes the email with subject, quoted content, headers, originally embedded images and recipients needed for a valid RFC reply.
@|bold Note 1:|@ replaces subject with "Re: " (but never nested).
@|bold Note 2:|@ always sets both plain text and HTML text, so if you update the content body, be sure to update HTML as well.
@|bold Note 3:|@ sets body content: text is replaced with @|green "> text"|@ and HTML is replaced with the provided (or default) quoting markup (add your own content with @|cyan --email:prependText|@ and @|cyan --email:prependTextHTML|@).--email:replyingToAl? ? ?The email to include as replied-to-email and who's receivers all will receive the new reply email.EML FIL?messag??HTML quoting template that should be used in the reply. Should include the substring @|green "%%s"|@, or else the original email is not embedded in the reply.TEX?customQuotingTemplat? ?replyingToAl? ?replyingToAl? ? ?Delegates to @|cyan --email:replyingTo|@ (see below) with replyToAll set to @|green true|@ and a default HTML quoting template.?
@|bold -> --email:replyingTo emailMessage(=EML FILE) repyToAll(=BOOL) htmlTemplate(=TEXT)|@:
Primes the email with subject, quoted content, headers, originally embedded images and recipients needed for a valid RFC reply.
@|bold Note 1:|@ replaces subject with "Re: " (but never nested).
@|bold Note 2:|@ always sets both plain text and HTML text, so if you update the content body, be sure to update HTML as well.
@|bold Note 3:|@ sets body content: text is replaced with @|green "> text"|@ and HTML is replaced with the provided (or default) quoting markup (add your own content with @|cyan --email:prependText|@ and @|cyan --email:prependTextHTML|@).?--email:replyingToAllWithDefaultQuoteMarkup ? ?The email to include as replied-to-email and who's receivers all will receive the new reply email.EML FIL?messag? s " ?replyingToAl? s " ?replyingToAl? " " ? ?Delegates to @|cyan --email:replyingTo|@ (see below) with replyToAll set to @|green false|@.?
@|bold -> --email:replyingTo emailMessage(=EML FILE) repyToAll(=BOOL) htmlTemplate(=TEXT)|@:
Primes the email with subject, quoted content, headers, originally embedded images and recipients needed for a valid RFC reply.
@|bold Note 1:|@ replaces subject with "Re: " (but never nested).
@|bold Note 2:|@ always sets both plain text and HTML text, so if you update the content body, be sure to update HTML as well.
@|bold Note 3:|@ sets body content: text is replaced with @|green "> text"|@ and HTML is replaced with the provided (or default) quoting markup (add your own content with @|cyan --email:prependText|@ and @|cyan --email:prependTextHTML|@).--email:replyingToSende? ? ?MimeMessage to reply to with new email.EML FIL?messag??HTML quoting template that should be used in the reply. Should include the substring @|green "%%s"|@, or else the original email is not embedded in the reply.TEX?customQuotingTemplat? s ! ?replyingT? s ! ?replyingT? ? ?Delegates to @|cyan --email:replyingTo|@ (see below) with replyToAll set to @|green false|@ and a default HTML quoting template.?
@|bold -> --email:replyingTo emailMessage(=EML FILE) repyToAll(=BOOL) htmlTemplate(=TEXT)|@:
Primes the email with subject, quoted content, headers, originally embedded images and recipients needed for a valid RFC reply.
@|bold Note 1:|@ replaces subject with "Re: " (but never nested).
@|bold Note 2:|@ always sets both plain text and HTML text, so if you update the content body, be sure to update HTML as well.
@|bold Note 3:|@ sets body content: text is replaced with @|green "> text"|@ and HTML is replaced with the provided (or default) quoting markup (add your own content with @|cyan --email:prependText|@ and @|cyan --email:prependTextHTML|@).?--email:replyingToSenderWithDefaultQuoteMarkup ? ?MimeMessage to reply to with new email.EML FIL?messag? s ?replyingT? s ?replyingT? ? ?Delegates to java-only method @|italic,faint signWithSmime(SmimeSigningConfig)|@ (see below).?
@|bold Note:|@ this only works in combination with the @|green S/MIME module|@.
@|bold -> signWithSmime(SmimeSigningConfig)|@:%n Signs this email with an S/MIME (https://tools.ietf.org/html/rfc5751) signature, so the receiving client can verify whether the email content was tampered with.
@|bold Note:|@ this only works in combination with the @|green S/MIME module|@.
@|bold Note:|@ You can also configure your @|green Mailer|@ instance do sign all emails by default (also has better performance).--email:signWithSmim? ? ?The key store file to use to find the indicated keyFIL?pkcs12StoreFil?The store's passwor?TEX?storePasswor??The name of the certificate in the key store to useTEX?keyAlia?The password of the certificat?TEX?keyPasswor??The signature algorithm to use for signing. If omitted, the default algorithm is used. See @|green SmimeSigningConfig|@ for details.TEX?signatureAlgorith? ?signWithSmim? $ ?signWithSmim? $ ? ? ? ?Most common use case for creating a new email. Starts with an empty email, populated with defaults when set through config properties (if not disabled using @|cyan --email:ignoringDefaults|@.?
@|bold Note:|@ Any builder method called after this will override the default value.--email:startingBlan? ?startingBlan? ?startingBlan?
? ?Delegates to @|green withRecipients(String, boolean, Collection, Message.RecipientType)|@, with @|green recipientType=|@@|green Message.RecipientType.TO|@ and @|green fixedName=true|@ assigning or overwriting existing names with the provided name.--email:t? ? ?The optional name of the TO receiver(s) of the email. If multiples addresses are provided, all addresses will be in this same name.TEX?nam? ?Single RFC2822 address or delimited list of RFC2822 addresses of TO receiver(s). Any names included are ignored if a name was provided.[email protected]??Lolly Pop?Moonpie ;Daisy [email protected],[email protected],[email protected]?TEX?oneOrMoreAddresse? ?t?
$ ?t?
$ ? ?Delegates to @|cyan --email:withEncodedDescribedAttachment|@ (see below) with null-description and no forced content transfer encoding.?
@|bold -> --email:withEncodedDescribedAttachment name(=TEXT) filedata(=FILE) description(=TEXT) contentTransferEncoding(=NAME)|@:
Adds an attachment to the email message, which will be shown in the email client as seperate files available for download or inline display if the client supports it (for example, most browsers these days display PDF's in a popup).
@|bold Note|@: for embedding images instead of attaching them for download, refer to @|cyan --email:withEmbeddedImage|@ instead.--email:withAttachmen? ? ?Optional name of the attachment (e.g. 'filename.ext'). If omitted, the internal name of the datasource is used. If that too is empty, a name will be generated using @|green java.util.UUID|@.TEX?nam? The attachment data?FIL?filedat? ?withAttachmen? $ jakarta.activation.DataSourc? ?withAttachmen? $ ? ? ? ?Delegates to java-only method @|italic,faint withBounceTo(Recipient)|@ (see below) with a new @|green Recipient|@ wrapped around the given name and email address.?
@|bold -> withBounceTo(Recipient)|@:%n Sets the @|italic bounceTo|@ address of this email with given @|green Recipient|@ (ignoring its @|green Message.RecipientType|@ if provided).
If provided, SMTP server should return bounced emails to this address. This is also known as the @|green Return-Path|@ (or @|italic Envelope FROM|@).--email:withBounceT? ? ?Name of the receiver of the bounced emailTEX?nam? ?The address of the receiver of the bounced emailTEX?bounceToAddres? ?withBounceT? $ ?withBounceT? $ ? ? ? ?Sets the optional calendar details that clients such as Outlook might be able to handle. Will be set as alternative bodypart similar to @|cyan --email:withPlainText|@ and @|cyan --email:withHTMLText|@.--email:withCalendarTex? ? ?An RFC-2446 VEVENT calendar component method.?@|green PUBLISH, REQUEST, REPLY, ADD, CANCEL, REFRESH, COUNTER, DECLINECOUNTER|@RFC-2446 VEVENT METHO?calendarMetho??free form text, which you can produce with a library such as ical4j (https://github.com/ical4j/ical4j/wiki/Examples).TEX?textCalenda? ?withCalendarTex? org.simplejavamail.api.email.CalendarMetho? ?withCalendarTex? ? ? ? ?Determines what encoding is applied to the text/html/iCalendar encoding in the MimeMessage/EML. Default is @|green ContentTransferEncoding.QUOTED_PRINTABLE|@, which basicallt means plain text, so you can just read the content of the EML (if not encrypted).?
However, you can choose another encoding as supported by Jakarta Mail. The list is quite extensive, but the most common alternative is base64. This might be useful for example for obfuscating the content to some extent.?--email:withContentTransferEncoding ? ?The encoder to use for the text/html/iCalendar content.NAM?contentTransferEncodin? ?withContentTransferEncodin?
org.simplejavamail.api.email.ContentTransferEncodin? ?withContentTransferEncodin?
p p ? ?Delegates to @|cyan --email:withEncodedDescribedAttachment|@ (see below) with no forced content transfer encoding.?
@|bold -> --email:withEncodedDescribedAttachment name(=TEXT) filedata(=FILE) description(=TEXT) contentTransferEncoding(=NAME)|@:
Adds an attachment to the email message, which will be shown in the email client as seperate files available for download or inline display if the client supports it (for example, most browsers these days display PDF's in a popup).
@|bold Note|@: for embedding images instead of attaching them for download, refer to @|cyan --email:withEmbeddedImage|@ instead.--email:withDescribedAttachmen? ? ?Optional name of the attachment (e.g. 'filename.ext'). If omitted, the internal name of the datasource is used. If that too is empty, a name will be generated using @|green java.util.UUID|@.TEX?nam? The attachment data?FIL?filedat??An optional description that will find its way in the MimeMEssage with the Content-Description header. This is rarely needed.TEX?descriptio? s ? ?withAttachmen? $ $ s ? ?withAttachmen? $ $ ? ? ? ?Delegates to java-only method @|italic,faint withDispositionNotificationTo(Recipient)|@ (see below) with a new @|green Recipient|@ wrapped around the provided name and address.?
@|bold -> withDispositionNotificationTo(Recipient)|@:%n Indicates this email should use the NPM flag "Disposition-Notification-To" (https://tools.ietf.org/html/rfc8098) with the given preconfigred @|green Recipient|@. This flag can be used to request a return receipt from the recipient to signal that the recipient has read the email.
This flag may be ignored by SMTP clients (for example gmail ignores it completely, while the Google Apps business suite honors it).?--email:withDispositionNotificationTo ? ?Optional name of the receiver of the notificationTEX?nam? ?The address of the receiver of the notificationTEX?addres? ?withDispositionNotificationT? $ ?withDispositionNotificationT? $ ? ? ? ?Indicates that we want to use the NPM flag @|green dispositionNotificationTo|@. The actual address will default to the @|green replyToRecipient|@ first if set or else @|green fromRecipient|@ (the final address is determined when sending this email).?--email:withDispositionNotificationToEnabled s ? ?withDispositionNotificationT? s ? ?withDispositionNotificationT? ? ? ? ?Adds image data to this email that can be referred to from the email HTML body. For adding images as attachment, refer to @|green .withAttachment(String, DataSource)|@ instead.?
The provided @|green DataSource|@ is assumed to be of mimetype png, jpg or whatever the email client supports as valid image embedded in HTML content.--email:withEmbeddedImag? ? ?The name of the image as being referred to from the message content body (e.g. 'src="cid:yourImageName"'). If not provided, the name of the given data source is used instead.TEX?nam? The image data?FIL?imagedat? ?withEmbeddedImag? $ ?withEmbeddedImag? $ ? ? ? ?Enables auto resolution of classpath datasources for embedded images.?
Normally, you would manually mark up your HTML with images using @|green cid:|@ and then add an embedded image resource with the same name (@|green emailBuilder.withEmbeddedImage(..)|@). With auto-classpath-resolution, you can just refer to the resource on the classpath instead and the data will be included dynamically with a generated @|italic cid|@.?--email:withEmbeddedImageAutoResolutionForClassPathResources ? ?Enables auto resolution of classpath datasources for embedded images.BOO̱embeddedImageAutoResolutionForClassPathResources ??withEmbeddedImageAutoResolutionForClassPathResources ??withEmbeddedImageAutoResolutionForClassPathResources ? ? ? ?Enables auto resolution of file datasources for embedded images.?
Normally, you would manually mark up your HTML with images using @|green cid:|@ and then add an embedded image resource with the same name (@|green emailBuilder.withEmbeddedImage(..)|@). With auto-file-resolution, you can just refer to the file instead and the data will be included dynamically with a generated @|italic cid|@.?--email:withEmbeddedImageAutoResolutionForFiles ? ?Enables auto resolution of file datasources for embedded images.BOO̤embeddedImageAutoResolutionForFiles ??withEmbeddedImageAutoResolutionForFiles ??withEmbeddedImageAutoResolutionForFiles B B ? ?Enables auto resolution of URL's for embedded images.?
Normally, you would manually mark up your HTML with images using @|green cid:|@ and then add an embedded image resource with the same name (@|green emailBuilder.withEmbeddedImage(..)|@). With auto-URL-resolution, you can just refer to the hosted image instead and the data will be downloaded and included dynamically with a generated @|italic cid|@.?--email:withEmbeddedImageAutoResolutionForURLs ? ?Enables auto resolution of URL's for embedded images.BOỌembeddedImageAutoResolutionForURLs ??withEmbeddedImageAutoResolutionForURLs ??withEmbeddedImageAutoResolutionForURLs D D ? ?Sets the classpath base used when resolving images sources in HTML text. Without this, the resource needs to be an absolute path (or a file/url resource).?
Generally you would manually use src="cid:image_name", but files and url's will be located as well dynamically.?--email:withEmbeddedImageBaseClassPath ? ?The classpath base used when resolving images sources in HTML text.TEX?embeddedImageBaseClassPat? ?withEmbeddedImageBaseClassPat? ?withEmbeddedImageBaseClassPat? ? ? ? ?Sets the base folder used when resolving images sources in HTML text. Without this, the folder needs to be an absolute path (or a classpath/url resource).?
Generally you would manually use src="cid:image_name", but files and url's will be located as well dynamically.--email:withEmbeddedImageBaseDi? ? ?The base folder used when resolving images sources in HTML text.TEX?embeddedImageBaseDi? ?withEmbeddedImageBaseDi? ?withEmbeddedImageBaseDi? ? ? ? ?Delegates to java-only method @|italic,faint withEmbeddedImageBaseUrl(URL)|@ (see below).?
@|bold -> withEmbeddedImageBaseUrl(URL)|@:%n Sets the base URL used when resolving images sources in HTML text. Without this, the resource needs to be an absolute URL (or a file/classpath resource).
Generally you would manually use src="cid:image_name", but files and url's will be located as well dynamically.--email:withEmbeddedImageBaseUr? ? ?The base URL used when resolving images sources in HTML text.TEX?embeddedImageBaseUr? ?withEmbeddedImageBaseUr? ?withEmbeddedImageBaseUr? ? ? ? ?Adds an attachment to the email message, which will be shown in the email client as seperate files available for download or inline display if the client supports it (for example, most browsers these days display PDF's in a popup).?
@|bold Note|@: for embedding images instead of attaching them for download, refer to @|cyan --email:withEmbeddedImage|@ instead.?--email:withEncodedDescribedAttachment ? ?Optional name of the attachment (e.g. 'filename.ext'). If omitted, the internal name of the datasource is used. If that too is empty, a name will be generated using @|green java.util.UUID|@.TEX?nam? The attachment data?FIL?filedat??An optional description that will find its way in the MimeMEssage with the Content-Description header. This is rarely needed.TEX?descriptio? ?An optional encoder option to force the data encoding while in MimeMessage/EML format.NAM?contentTransferEncodin? s ? ?withAttachmen? $ $ $
s ? ?withAttachmen? $ $ $
? ? ? ?Sets the optional email message body in HTML text.?
Both text and HTML can be provided, which will be offered to the email client as alternative content. Email clients that support it, will favor HTML over plain text and ignore the text body completely.--email:withHTMLTex? ? ?HTML text to set as email body (overwrites any previous HTML text body). If no HTML body is included, plain text would be used instead by the email client if provided.TEX?textHTM? ?withHTMLTex? $ ?withHTMLTex? $ ? ? ? ?Delegates to @|cyan --email:withHTMLText|@ (see below).?
@|bold -> --email:withHTMLText textHTML(=TEXT)|@:
Sets the optional email message body in HTML text.
Both text and HTML can be provided, which will be offered to the email client as alternative content. Email clients that support it, will favor HTML over plain text and ignore the text body completely.--email:withHTMLTextFromFil? ? ?HTML text to set as email body (overwrites any previous HTML text body). If no HTML body is included, plain text would be used instead by the email client if provided.FIL?textHTMLFil? s : ?withHTMLTex? s : ?withHTMLTex? ? ? ? ?Delegates to java-only method @|italic,faint withHeader(String, Object, boolean)|@ (see below) with @|italic replaceHeader|@ set to @|green false|@.?
@|bold -> withHeader(String, Object, boolean)|@:%n Adds a header which will be included in the email. The value is stored as a @|green String|@. Can be directed to replace the headers collection of values.--email:withHeade? ? The name of the header??@|green withHeader("X-Priority", 2)|@TEX?nam??The value of the header, which will be stored using java-only method @|italic,faint valueOf(Object)|@.TEX?valu? ?withHeade? $ java.lang.Objec? ?withHeade? $ L L ? ?Sets the optional email message body in plain text.?
Both text and HTML can be provided, which will be offered to the email client as alternative content. Email clients that support it, will favor HTML over plain text and ignore the text body completely.--email:withPlainTex? ? ?Plain text to set as email body (overwrites any previous plain text body). If no HTML body is included as well, plain text would be used instead by the email client.TEX?tex? ?withPlainTex? $ ?withPlainTex? $ ? ? ? ?Delegates to @|cyan --email:withPlainText|@ (see below).?
@|bold -> --email:withPlainText text(=TEXT)|@:
Sets the optional email message body in plain text.
Both text and HTML can be provided, which will be offered to the email client as alternative content. Email clients that support it, will favor HTML over plain text and ignore the text body completely.--email:withPlainTextFromFil? ? ?Plain text to set as email body (overwrites any previous plain text body). If no HTML body is included as well, plain text would be used instead by the email client.FIL?textFil? s 4 ?withPlainTex? s 4 ?withPlainTex? ? ? ? ?Delegates to java-only method @|italic,faint withReplyTo(Recipient)|@ (see below) with a new @|green Recipient|@ wrapped around the given fixed name and email address.?
@|bold -> withReplyTo(Recipient)|@:%n Delegates to #withReplyTo(Recipient...)--email:withReplyT? ? ?Optional name that receivers will get when they reply to the email.TEX?fixedNam? ?The address that receivers will get when they reply to the email. Any name included in the address will be ignored.TEX?replyToAddres? ?withReplyT? $ ?withReplyT? $ ? ? ? ?Delegates to java-only method @|italic,faint withReturnReceiptTo(Recipient)|@ (see below) with a new @|green Recipient|@ wrapped around the provided name and address.?
@|bold -> withReturnReceiptTo(Recipient)|@:%n Indicates that this email should use the RRT flag "Return-Receipt-To" (https://en.wikipedia.org/wiki/Return_receipt) with the preconfigured @|green Recipient|@. This flag can be used to request a notification from the SMTP server recipient to signal that the recipient has read the email.
This flag is rarely used, but your mail server / client might implement this flag to automatically send back a notification that the email was received on the mail server or opened in the client, depending on the chosen implementation.--email:withReturnReceiptT? ? ?Name of the receiver of the receipt notificationTEX?nam? ?The address of the receiver of the receipt notificationTEX?addres? ?withReturnReceiptT? $ ?withReturnReceiptT? $ ? ? ? ?Indicates that we want to use the flag @|green returnReceiptTo|@. The actual address will default to the @|green replyToRecipient|@ first if set or else @|green fromRecipient|@ (the final address is determined when sending the email).?
For more detailed information, refer to java-only method @|italic,faint withReturnReceiptTo(Recipient)|@.?--email:withReturnReceiptToEnabled s ? ?withReturnReceiptT? s ? ?withReturnReceiptT? ? ? ? ?Sets the optional subject of this email.--email:withSubjec? ? ?Optional text to be used in the subject field of the email.TEX?subjec? ?withSubjec? $ ?withSubjec? $ ? ? ? ?Changes the default for sending emails and testing server connections to asynchronous (batch mode).?
In case of asynchronous mode, make sure you configure logging to file or inspect the returned @|green java.util.concurrent.CompletableFuture|@.
Note that you can configure a couple of concurrency properties such as thread pool size, keepAlivetime, connection pool size (or even a cluster) etc.
@|bold Note:|@ without configuring a thread pool (see java-only method @|italic,faint withExecutorService(ExecutorService)|@ or--mailer:asyn? org.simplejavamail.api.mailer.MailerGenericBuilde? ?asyn? ?asyn? ? ?Makes the reference @|green Email|@ instance @|green null|@, meaning no defaults will be applied.--mailer:clearEmailDefault? ?clearEmailDefault? ?clearEmailDefault? X X ? ?Makes the reference @|green Email|@ instance @|green null|@, meaning no overrides will be applied.--mailer:clearEmailOverride? ?clearEmailOverride? ?clearEmailOverride? t t ? ?Makes the email validator @|green null|@, meaning validation won't take place.--mailer:clearEmailValidato? ?clearEmailValidato? ?clearEmailValidato? d d ? ?Makes the maximum email size @|green null|@, meaning no size check will be performed.--mailer:clearMaximumEmailSiz? ?clearMaximumEmailSiz? ?clearMaximumEmailSiz? b b ? Removes all properties?--mailer:clearPropertie? ?clearPropertie? ?clearPropertie? ? ? ? Empties all proxy configuration?--mailer:clearProx? ?clearProx? ?clearProx? ? ? ? ?Removes all trusted hosts from the list.--mailer:clearTrustedSSLHost? ?clearTrustedSSLHost? ?clearTrustedSSLHost? T T ? ?Controls whether there will be any client-sided validation, including email address validation and CRLF injection attack detection (which will be warning instead).?
If set to @|green true|@, this silences the client completely and just delegates all responsibility of correctness/security to the server.?--mailer:disablingAllClientValidation ? ?Enables or disables client-side email address validation (if configured) and CRLF injection scans. Default set to @|green false|@.BOO?disableAllClientValidatio? ?disablingAllClientValidatio? ? ?disablingAllClientValidatio? ? &