public final class DEmailSender extends Object
| Modifier and Type | Method and Description |
|---|---|
static DEmailSender |
of(SmtpProperties properties)
Creates instance of the
DEmailSender class. |
SendingStatus |
send(OutgoingMessage message)
The common method for sending
OutgoingMessage messages. |
SendingStatus |
send(Set<EmailParticipant> recipients,
String subject,
String content,
ContentMessageType contentType,
Charset charsetContent,
List<EmailAttachment> attachments)
The common method is sending a text message.
|
EmailParticipant |
sender()
Returns information about sender as object of the class
EmailParticipant. |
SendingStatus |
sendHtml(Collection<String> emails,
String subject,
String content)
The method is distributing a message to a group recipients.
|
SendingStatus |
sendHtml(Collection<String> emails,
String subject,
String content,
EmailAttachment... attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendHtml(Collection<String> emails,
String subject,
String content,
List<EmailAttachment> attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendHtml(Set<EmailParticipant> recipients,
String subject,
String content,
List<EmailAttachment> attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendHtml(Set<String> emails,
String subject,
String content,
EmailAttachment... attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendHtml(String email,
String subject,
String content)
The method is sending a message.
|
SendingStatus |
sendHtml(String email,
String subject,
String content,
EmailAttachment... attachments)
The method is sending a message with attachments.
|
SendingStatus |
sendHtml(String email,
String subject,
String content,
List<EmailAttachment> attachments)
The method is sending a message with attachments.
|
SendingStatus |
sendHtmlTemplated(Collection<String> emails,
String subject,
String pathToTemplate,
Map<String,Object> params)
The method is distributing a message to a group recipients.
|
SendingStatus |
sendHtmlTemplated(Collection<String> emails,
String subject,
String pathToTemplate,
Map<String,Object> params,
EmailAttachment... attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendHtmlTemplated(Collection<String> emails,
String subject,
String pathToTemplate,
Map<String,Object> params,
List<EmailAttachment> attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendHtmlTemplated(Set<EmailParticipant> recipients,
String subject,
String pathToTemplate,
Map<String,Object> params,
List<EmailAttachment> attachments)
The method is distributing a message to a group of recipients with attachments.
|
SendingStatus |
sendHtmlTemplated(String email,
String subject,
String pathToTemplate,
Map<String,Object> params)
The method is sending a message.
|
SendingStatus |
sendHtmlTemplated(String email,
String subject,
String pathToTemplate,
Map<String,Object> params,
EmailAttachment... attachments)
The method is sending a message with attachments.
|
SendingStatus |
sendHtmlTemplated(String email,
String subject,
String pathToTemplate,
Map<String,Object> params,
List<EmailAttachment> attachments)
The method is sending a message with attachments.
|
SendingStatus |
sendTemplatedMessage(Set<EmailParticipant> recipients,
String subject,
String pathToTemplate,
Map<String,Object> params,
ContentMessageType contentType,
Charset charsetContent,
List<EmailAttachment> attachments)
The common method is sending a templated message.
|
SendingStatus |
sendText(Collection<String> emails,
String subject,
String content)
The method is distributing a message to a group recipients.
|
SendingStatus |
sendText(Collection<String> emails,
String subject,
String content,
EmailAttachment... attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendText(Collection<String> emails,
String subject,
String content,
List<EmailAttachment> attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendText(Set<EmailParticipant> recipients,
String subject,
String content,
List<EmailAttachment> attachments)
The method is distributing a message to a group recipients with attachments.
|
SendingStatus |
sendText(String email,
String subject,
String content)
The method is sending a message.
|
SendingStatus |
sendText(String email,
String subject,
String content,
EmailAttachment... attachments)
The method is sending a message with attachments.
|
SendingStatus |
sendText(String email,
String subject,
String content,
List<EmailAttachment> attachments)
The method is sending a message with attachments.
|
SendingStatus |
sendTextTemplated(Collection<String> emails,
String subject,
String pathToTemplate,
Map<String,Object> params)
The method is distributing a message to a group of recipients.
|
SendingStatus |
sendTextTemplated(Collection<String> emails,
String subject,
String pathToTemplate,
Map<String,Object> params,
EmailAttachment... attachments)
The method is distributing a message to a group of recipients with attachments.
|
SendingStatus |
sendTextTemplated(Collection<String> emails,
String subject,
String pathToTemplate,
Map<String,Object> params,
List<EmailAttachment> attachments)
The method is distributing a message to a group of recipients with attachments.
|
SendingStatus |
sendTextTemplated(Set<EmailParticipant> recipients,
String subject,
String pathToTemplate,
Map<String,Object> params,
List<EmailAttachment> attachments)
The method is distributing a message to a group of recipients with attachments.
|
SendingStatus |
sendTextTemplated(String email,
String subject,
String pathToTemplate,
Map<String,Object> params)
The method is sending a message.
|
SendingStatus |
sendTextTemplated(String email,
String subject,
String pathToTemplate,
Map<String,Object> params,
EmailAttachment... attachments)
The method is sending a message with attachments.
|
SendingStatus |
sendTextTemplated(String email,
String subject,
String pathToTemplate,
Map<String,Object> params,
List<EmailAttachment> attachments)
The method is sending a message with attachments.
|
public static DEmailSender of(SmtpProperties properties)
DEmailSender class.properties - properties for connecting to an email server by the SMTP protocol (SmtpProperties)DEmailSenderpublic EmailParticipant sender()
EmailParticipant.EmailParticipantpublic SendingStatus sendText(String email, String subject, String content)
A message body has a content type of text/plain.
A message body takes from "content" argument. It has a type String.
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodySendingStatuspublic SendingStatus sendText(Collection<String> emails, String subject, String content)
A message body has a content type of text/plain.
A message body takes from "content" argument. It has a type String.
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodySendingStatuspublic SendingStatus sendText(Collection<String> emails, String subject, String content, EmailAttachment... attachments)
A message body has a content type of text/plain.
A message body takes from "content" argument. It has a type String.
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendText(Collection<String> emails, String subject, String content, List<EmailAttachment> attachments)
A message body has a content type of text/plain.
A message body takes from "content" argument. It has a type String.
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendText(String email, String subject, String content, EmailAttachment... attachments)
A message body has a content type of text/plain.
A message body takes from "content" argument. It has a type String.
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendText(String email, String subject, String content, List<EmailAttachment> attachments)
A message body has a content type of text/plain.
A message body takes from "content" argument. It has a type String.
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendText(Set<EmailParticipant> recipients, String subject, String content, List<EmailAttachment> attachments)
A message body has a content type of text/plain.
A message body takes from "content" argument. It has a type String.
recipients - the set of information about recipients (EmailParticipant)subject - a subject of a messagecontent - a message bodyattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtml(String email, String subject, String content)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodySendingStatuspublic SendingStatus sendHtml(Collection<String> emails, String subject, String content)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodySendingStatuspublic SendingStatus sendHtml(Set<String> emails, String subject, String content, EmailAttachment... attachments)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtml(Collection<String> emails, String subject, String content, List<EmailAttachment> attachments)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtml(Collection<String> emails, String subject, String content, EmailAttachment... attachments)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtml(String email, String subject, String content, EmailAttachment... attachments)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtml(String email, String subject, String content, List<EmailAttachment> attachments)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagecontent - a message bodyattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtml(Set<EmailParticipant> recipients, String subject, String content, List<EmailAttachment> attachments)
A message body has a content type of text/html.
A message body takes from "content" argument. It has a type String.
recipients - the set of information about recipients (EmailParticipant)subject - a subject of a messagecontent - a message bodyattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtmlTemplated(String email, String subject, String pathToTemplate, Map<String,Object> params)
A message body has a content type of text/html.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateSendingStatuspublic SendingStatus sendHtmlTemplated(Collection<String> emails, String subject, String pathToTemplate, Map<String,Object> params)
A message body has a content type of text/html.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateSendingStatuspublic SendingStatus sendHtmlTemplated(Collection<String> emails, String subject, String pathToTemplate, Map<String,Object> params, EmailAttachment... attachments)
A message body has a content type of text/html.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtmlTemplated(Collection<String> emails, String subject, String pathToTemplate, Map<String,Object> params, List<EmailAttachment> attachments)
A message body has a content type of text/html.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtmlTemplated(String email, String subject, String pathToTemplate, Map<String,Object> params, EmailAttachment... attachments)
A message body has a content type of text/html.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtmlTemplated(String email, String subject, String pathToTemplate, Map<String,Object> params, List<EmailAttachment> attachments)
A message body has a content type of text/html.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendHtmlTemplated(Set<EmailParticipant> recipients, String subject, String pathToTemplate, Map<String,Object> params, List<EmailAttachment> attachments)
A message body has a content type of text/html.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
recipients - the set of information about recipients (EmailParticipant)subject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendTextTemplated(String email, String subject, String pathToTemplate, Map<String,Object> params)
A message body has a content type of text/plain.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateSendingStatuspublic SendingStatus sendTextTemplated(Collection<String> emails, String subject, String pathToTemplate, Map<String,Object> params)
A message body has a content type of text/plain.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateSendingStatuspublic SendingStatus sendTextTemplated(Collection<String> emails, String subject, String pathToTemplate, Map<String,Object> params, EmailAttachment... attachments)
A message body has a content type of text/plain.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendTextTemplated(Collection<String> emails, String subject, String pathToTemplate, Map<String,Object> params, List<EmailAttachment> attachments)
A message body has a content type of text/plain.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
emails - a collection of recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendTextTemplated(String email, String subject, String pathToTemplate, Map<String,Object> params, EmailAttachment... attachments)
A message body has a content type of text/plain.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - an array of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendTextTemplated(String email, String subject, String pathToTemplate, Map<String,Object> params, List<EmailAttachment> attachments)
A message body has a content type of text/plain.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
email - a recipient email address. For example: example@mail.comsubject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendTextTemplated(Set<EmailParticipant> recipients, String subject, String pathToTemplate, Map<String,Object> params, List<EmailAttachment> attachments)
A message body has a content type of text/plain.
A message body is created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
recipients - the set of information about recipients (EmailParticipant)subject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templateattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus sendTemplatedMessage(Set<EmailParticipant> recipients, String subject, String pathToTemplate, Map<String,Object> params, ContentMessageType contentType, Charset charsetContent, List<EmailAttachment> attachments)
A message body created using the Apache Velocity Template engine.
For more information about the velocity template engine, use the link: Apache Velocity Project
For simplifying attachment creation, use the AttachmentUtils utility class
recipients - the set of information about recipients (EmailParticipant)subject - a subject of a messagepathToTemplate - a path to templateparams - parameters for the templatecontentType - the content type of contentcharsetContent - the encoding of contentattachments - a list of attachments (EmailAttachment)SendingStatuspublic SendingStatus send(Set<EmailParticipant> recipients, String subject, String content, ContentMessageType contentType, Charset charsetContent, List<EmailAttachment> attachments)
For simplifying attachment creation, use the AttachmentUtils utility class
recipients - the set of recipientssubject - the message subjectcontent - the message bodyattachments - a list of attachmentsSendingStatuspublic SendingStatus send(OutgoingMessage message)
OutgoingMessage messages.message - an outgoing messageSendingStatusCopyright © 2023. All rights reserved.