Package org.jgrapes.mail.events
Class SendMailMessage
- All Implemented Interfaces:
Future<Void>
,Associator
,Eligible
Indicates the arrival of a new message.
Handler should delete the message after successful processing.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State
-
Field Summary
Fields inherited from class org.jgrapes.core.internal.EventBase
completed, completionEvents, invokedFor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddContent
(BodyPart part) Adds the part to the content.Address[]
bcc()
Gets the bcc addresses.Address[]
cc()
Gets the cc addresses.content()
Returns the content.from()
Gets the from addresses.headers()
Return the headers.Sets the bcc addresses.Sets the bcc addresses.Sets the cc addresses.Sets the cc addresses.setContent
(MimeMultipart content) Sets the content.Sets the from.Sets a header.setSubject
(String subject) Sets the subject.Sets the to addresses.Sets the to addresses.subject()
Gets the subject.Address[]
to()
Gets the to addresses.Methods inherited from class org.jgrapes.core.Event
addCompletionEvent, associated, cancel, channels, channels, completionEvents, currentResults, defaultCriterion, forChannels, get, get, handled, handlingError, isCancelled, isDone, isEligibleFor, isStopped, processedBy, results, results, resumeHandling, setAssociated, setChannels, setRequiresResult, setResult, stop, suspendHandling, suspendHandling, tieTo, toString
Methods inherited from class org.jgrapes.core.internal.EventBase
disableTracking, enqueued, firstResultAssigned, isTracked, onCompletion
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.jgrapes.core.Associator
associated, associated, associated, associatedGet
Methods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
SendMailMessage
Creates a new event.- Parameters:
channels
- the channels
-
-
Method Details
-
from
Gets the from addresses.- Returns:
- the from
-
setFrom
Sets the from.- Parameters:
from
- the from to set
-
to
Gets the to addresses.- Returns:
- the to
-
setTo
Sets the to addresses.- Parameters:
to
- the to addresses to set
-
setTo
Sets the to addresses.- Parameters:
to
- the to addresses to set
-
cc
Gets the cc addresses.- Returns:
- the cc
-
setCc
Sets the cc addresses.- Parameters:
cc
- the cc adresses to set
-
setCc
Sets the cc addresses.- Parameters:
cc
- the cc adresses to set
-
bcc
Gets the bcc addresses.- Returns:
- the bcc
-
setBcc
Sets the bcc addresses.- Parameters:
bcc
- the bcc addresses to set
-
setBcc
Sets the bcc addresses.- Parameters:
bcc
- the bcc addresses to set
-
headers
Return the headers.- Returns:
- the headers
-
setHeader
Sets a header.- Parameters:
name
- the namevalue
- the value- Returns:
- the send mail message
-
subject
Gets the subject.- Returns:
- the subject
-
setSubject
Sets the subject.- Parameters:
subject
- the subject to set
-
content
Returns the content.- Returns:
- the mime multipart
-
setContent
Sets the content.- Parameters:
content
- the content- Returns:
- the send mail message
-
addContent
Adds the part to the content.- Parameters:
part
- the part- Returns:
- the send mail message
- Throws:
MessagingException
- the messaging exception
-