public interface MailService extends ADEPT2Service
JDBCDataSource). This is due to the fact, that some early
services like the licence manager or even the security manager may use this
service to notify about problems via mail. If you need to use other services
you will have to implement
MailService. This service is
started later and may rely on other services. For instance you can access the
log manager or even the execution manager from there.
No services other than the early started ones should use this interface! Use
MailService instead.
Immediate problems occurring when sending the mail will be indicated by the
corresponding receiver being returned together with the exception. However,
usually not all problems can be determined at once. For instance, a mail
server usually tries to send a mail several times before aborting.
Determining a problem also depends heavily on the implementation of the
MailService.
| Modifier and Type | Method and Description |
|---|---|
EmailResult |
sendMail(SessionToken session,
java.util.List<java.lang.String> to,
java.util.List<java.lang.String> cc,
java.util.List<java.lang.String> bcc,
java.lang.String subject,
java.lang.String body,
java.util.Map<java.lang.String,java.lang.String> addAttributes,
boolean allowAsyncRetry)
Sends a mail to the designated recipients having the designated subject and
the designated body and the optional additional attributes.
|
EmailResult |
sendMail(SessionToken session,
java.util.List<java.lang.String> to,
java.lang.String subject,
java.lang.String body,
boolean allowAsyncRetry)
Sends a mail to the designated recipients having the designated subject and
the designated body.
|
EmailResult |
sendMail(SessionToken session,
java.util.List<java.lang.String> to,
java.lang.String subject,
java.lang.String body,
java.util.Map<java.lang.String,java.lang.String> addAttributes,
boolean allowAsyncRetry)
Sends a mail to the designated recipients having the designated subject and
the designated body and the optional additional attributes.
|
EmailResult |
sendMail(SessionToken session,
java.lang.String from,
java.util.List<java.lang.String> to,
java.util.List<java.lang.String> cc,
java.util.List<java.lang.String> bcc,
java.lang.String subject,
java.lang.String body,
boolean allowAsyncRetry)
Sends a mail to the designated recipients having the designated sender,
subject and body.
|
EmailResult |
sendMail(SessionToken session,
java.lang.String from,
java.util.List<java.lang.String> to,
java.util.List<java.lang.String> cc,
java.util.List<java.lang.String> bcc,
java.lang.String subject,
java.lang.String body,
java.util.List<SerialisableAttachment> attachments,
java.util.Map<java.lang.String,java.lang.String> addAttributes,
boolean allowAsyncRetry)
Sends a mail to the designated recipients having the designated sender,
subject and body.
|
getLocalUris, getRelease, getRuntimeRequiredServices, getServiceInstanceName, getStartupRequiredServices, getURIs, init, ping, preShutdown, shutdown, startEmailResult sendMail(SessionToken session, java.util.List<java.lang.String> to, java.lang.String subject, java.lang.String body, boolean allowAsyncRetry)
Note that the mail will be sent as one message to all the recipients, i.e. if you need single results for every recipient you need to call this method with a singleton list!
session - The session which is used to check for access rights on this
method.to - The recipients of the mail. This must be at least one valid mail
address.subject - The subject of the mail. This must not be null.body - The body text of the mail. This must not be null.allowAsyncRetry - Whether sending the e-mail can be retried
asynchronously (after returning from this method) in case of a
recoverable problem. Neither the e-mail nor the corresponding
exception will in the result.EmailResult. If there were
problems sending the mail (to all recipients), the reason for
failing and whether a later retry would make sense could be found
in the EmailResult. Neither the e-mail nor the exception
will be in the result if asynchronous retry is allowed and an
exception occurred for which a retry is sensible.EmailResult sendMail(SessionToken session, java.util.List<java.lang.String> to, java.lang.String subject, java.lang.String body, java.util.Map<java.lang.String,java.lang.String> addAttributes, boolean allowAsyncRetry)
Note that the mail will be sent as one message to all the recipients, i.e. if you need single results for every recipient you need to call this method with a singleton list!
session - The session which is used to check for access rights on this
method.to - The recipients of the mail. This must be at least one valid mail
address.subject - The subject of the mail. This must not be null.body - The body text of the mail. This must not be null.addAttributes - Additional, service-specific attributes. The service
is free to support additional attributes. Since these attributes
depend on the service implementation, the callers may need to know
the used service implementation. null.allowAsyncRetry - Whether sending the e-mail can be retried
asynchronously (after returning from this method) in case of a
recoverable problem. Neither the e-mail nor the corresponding
exception will in the result.EmailResult. If there were
problems sending the mail (to all recipients), the reason for
failing and whether a later retry would make sense could be found
in the EmailResult. Neither the e-mail nor the exception
will be in the result if asynchronous retry is allowed and an
exception occurred for which a retry is sensible.EmailResult sendMail(SessionToken session, java.util.List<java.lang.String> to, java.util.List<java.lang.String> cc, java.util.List<java.lang.String> bcc, java.lang.String subject, java.lang.String body, java.util.Map<java.lang.String,java.lang.String> addAttributes, boolean allowAsyncRetry)
Note that the mail will be sent as one message to all the recipients, i.e. if you need single results for every recipient you need to call this method with a singleton list!
session - The session which is used to check for access rights on this
method.to - The recipients of the mail. This must be at least one valid mail
address.cc - The copy recipients of the mail. This may be null.bcc - The blind copy recipients of the mail. This may be
null.subject - The subject of the mail. This must not be null.body - The body text of the mail. This must not be null.addAttributes - Additional, service-specific attributes. The service
is free to support additional attributes. Since these attributes
depend on the service implementation, the callers may need to know
the used service implementation. null.allowAsyncRetry - Whether sending the e-mail can be retried
asynchronously (after returning from this method) in case of a
recoverable problem. Neither the e-mail nor the corresponding
exception will in the result.EmailResult. If there were
problems sending the mail (to all recipients), the reason for
failing and whether a later retry would make sense could be found
in the EmailResult. Neither the e-mail nor the exception
will be in the result if asynchronous retry is allowed and an
exception occurred for which a retry is sensible.EmailResult sendMail(SessionToken session, java.lang.String from, java.util.List<java.lang.String> to, java.util.List<java.lang.String> cc, java.util.List<java.lang.String> bcc, java.lang.String subject, java.lang.String body, boolean allowAsyncRetry)
Note that the mail will be sent as one message to all the recipients, i.e. if you need single results for every recipient you need to call this method with a singleton list!
session - The session which is used to check for access rights on this
method.from - The mail-address of the sender of the message. This must be a
valid mail address.to - The recipients of the mail. This must be at least one valid mail
address.cc - The copy recipients of the mail. This may be null.bcc - The blind copy recipients of the mail. This may be
null.subject - The subject of the mail. This must not be null.body - The body text of the mail. This must not be null.allowAsyncRetry - Whether sending the e-mail can be retried
asynchronously (after returning from this method) in case of a
recoverable problem. Neither the e-mail nor the corresponding
exception will in the result.EmailResult. If there were
problems sending the mail (to all recipients), the reason for
failing and whether a later retry would make sense could be found
in the EmailResult. Neither the e-mail nor the exception
will be in the result if asynchronous retry is allowed and an
exception occurred for which a retry is sensible.EmailResult sendMail(SessionToken session, java.lang.String from, java.util.List<java.lang.String> to, java.util.List<java.lang.String> cc, java.util.List<java.lang.String> bcc, java.lang.String subject, java.lang.String body, java.util.List<SerialisableAttachment> attachments, java.util.Map<java.lang.String,java.lang.String> addAttributes, boolean allowAsyncRetry)
Note that the mail will be sent as one message to all the recipients, i.e. if you need single results for every recipient you need to call this method with singleton lists!
session - The session which is used to check for access rights on this
method.from - The mail-address of the sender of the message. This must be a
valid mail address.to - The recipients of the mail. This must be at least one valid mail
address.cc - The copy recipients of the mail. This may be null.bcc - The blind copy recipients of the mail. This may be
null.subject - The subject of the mail. This must not be null.body - The body text of the mail. This must not be null.attachments - The attachments of the mail. null.addAttributes - Additional, service-specific attributes. The service
is free to support additional attributes. Since these attributes
depend on the service implementation, the callers may need to know
the used service implementation. null.allowAsyncRetry - Whether sending the e-mail can be retried
asynchronously (after returning from this method) in case of a
recoverable problem. Neither the e-mail nor the corresponding
exception will in the result.EmailResult. If there were
problems sending the mail (to all recipients), the reason for
failing and whether a later retry would make sense could be found
in the EmailResult. Neither the e-mail nor the exception
will be in the result if asynchronous retry is allowed and an
exception occurred for which a retry is sensible.