Interface BaseMail
- All Known Subinterfaces:
IncomeMail
,Mail
- All Known Implementing Classes:
AbstractBaseMail
,AbstractOutgoingMail
,DelegatingMail
,IncaIncomeMail
,IncaMail
,IncomeMailImpl
,MailImpl
public interface BaseMail
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAttachment
(Attachment attachment) void
addBcc
(jakarta.mail.internet.InternetAddress address) void
Add addresses from a String to "bcc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"void
Add addresses from aList<String>
to "bcc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"void
addCc
(jakarta.mail.internet.InternetAddress address) void
Add addresses from a String to "cc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"void
Add addresses from a Listto "cc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"void
addReplyTo
(jakarta.mail.internet.InternetAddress address) void
addReplyTo
(String addresses) Add addresses from a String to "replyTo".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"void
addReplyTo
(List<String> addresses) Add addresses from aList<String>
to "replyTo".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"void
addTo
(jakarta.mail.internet.InternetAddress address) void
Add addresses from a String to "to".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addressesvoid
Add addresses from aList<String>
to "to".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addressesvoid
void
clearBcc()
void
clearCc()
void
void
clearTo()
boolean
containsAttachment
(Attachment attachment) createAttachment
(jakarta.activation.MimeType mimeType) createAttachment
(@Nullable String id, jakarta.activation.MimeType mimeType) createAttachment
(@Nullable String id, @Nullable String fileName, Binary binary) Adds the given attachment to this mail.List
<jakarta.mail.internet.InternetAddress> getBcc()
List
<jakarta.mail.internet.InternetAddress> getCc()
jakarta.mail.internet.InternetAddress
getFrom()
@Nullable String
getHtml()
List
<jakarta.mail.internet.InternetAddress> @Nullable String
getText()
List
<jakarta.mail.internet.InternetAddress> getTo()
boolean
removeAttachment
(Attachment attachment) void
setFrom
(jakarta.mail.internet.InternetAddress from) void
void
setSubject
(@Nullable String subject) void
-
Field Details
-
NO_SUBJECT
- See Also:
-
-
Method Details
-
getSubject
String getSubject() -
setSubject
-
getFrom
jakarta.mail.internet.InternetAddress getFrom() -
setFrom
void setFrom(jakarta.mail.internet.InternetAddress from) -
getTo
List<jakarta.mail.internet.InternetAddress> getTo() -
addTo
void addTo(jakarta.mail.internet.InternetAddress address) -
addTo
Add addresses from aList<String>
to "to".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addresses- Parameters:
addresses
- List
-
addTo
Add addresses from a String to "to".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>" This is only necessary if no recipient entity is set or if you want to add further addresses- Parameters:
addresses
- String separated with "," or "\n"
-
clearTo
void clearTo() -
getCc
List<jakarta.mail.internet.InternetAddress> getCc() -
addCc
void addCc(jakarta.mail.internet.InternetAddress address) -
addCc
Add addresses from a Listto "cc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"- Parameters:
addresses
- List
-
addCc
Add addresses from a String to "cc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"- Parameters:
addresses
- String separated with "," or "\n"
-
clearCc
void clearCc() -
getBcc
List<jakarta.mail.internet.InternetAddress> getBcc() -
addBcc
void addBcc(jakarta.mail.internet.InternetAddress address) -
addBcc
Add addresses from aList<String>
to "bcc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"- Parameters:
addresses
- List
-
addBcc
Add addresses from a String to "bcc".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"- Parameters:
addresses
- String separated with "," or "\n"
-
clearBcc
void clearBcc() -
getReplyTo
List<jakarta.mail.internet.InternetAddress> getReplyTo() -
addReplyTo
void addReplyTo(jakarta.mail.internet.InternetAddress address) -
addReplyTo
Add addresses from a String to "replyTo".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"- Parameters:
addresses
- String separated with "," or "\n"
-
addReplyTo
Add addresses from aList<String>
to "replyTo".
Can be either only email or email and name in format: "firstname lastname <email>.
example: "Hans Meier <hmeier@tocco.ch>"- Parameters:
addresses
- List
-
clearReplyTo
void clearReplyTo() -
getText
-
setText
-
getHtml
-
setHtml
-
getAttachments
List<Attachment> getAttachments() -
clearAttachments
void clearAttachments() -
createAttachment
Attachment createAttachment(@Nullable @Nullable String id, @Nullable @Nullable String fileName, Binary binary) Adds the given attachment to this mail. The content is taken from the given binary. The returned attachment is restricted in that it is not allowed to load new content using methodsAttachment.setContent(byte[])
,Attachment.loadContent(java.io.InputStream)
orAttachment.setMimeType(MimeType)
for setting the mime type- Parameters:
id
- optional id for this attachmentfileName
- optional name for this attachmentbinary
- the content
-
createAttachment
-
createAttachment
-
addAttachment
-
removeAttachment
-
containsAttachment
-