Interface MailService
-
- All Known Implementing Classes:
MailServiceImpl
public interface MailService
- Author:
- Alexandre Russel
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description javax.mail.Store
getConnectedStore(String name)
Returns a connected store for this factory.javax.mail.Store
getConnectedStore(String name, Map<String,Object> context)
javax.mail.Transport
getConnectedTransport(String name)
Returns a connected transport for this factory.javax.mail.Transport
getConnectedTransport(String name, Map<String,Object> context)
PropertiesFetcher
getFetcher(String name)
MailBoxActions
getMailBoxActions(String factoryName, String folderName)
Returns an actions pipe configured with this factory.MailBoxActions
getMailBoxActions(String factoryName, String folderName, Map<String,Object> context)
MessageActionPipe
getPipe(String name)
Gets the pipe of actions for given namejavax.mail.Session
getSession(String name)
Returns a session for this factory, using the context to find the session or the default if no context is provided.javax.mail.Session
getSession(String name, Map<String,Object> context)
void
sendMail(String text, String subject, String factory, javax.mail.Address[] recipients)
Sends a mail using the setting of this factory to this recipients.void
sendMail(String text, String subject, String factory, javax.mail.Address[] recipients, Map<String,Object> context)
-
-
-
Method Detail
-
getMailBoxActions
MailBoxActions getMailBoxActions(String factoryName, String folderName) throws javax.mail.MessagingException
Returns an actions pipe configured with this factory.The actions will start from this folder. The context is be passed to the sessionFactory to be able to find the session. Use the default session if context is not used.
- Throws:
javax.mail.MessagingException
-
getMailBoxActions
MailBoxActions getMailBoxActions(String factoryName, String folderName, Map<String,Object> context) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
getPipe
MessageActionPipe getPipe(String name)
Gets the pipe of actions for given name
-
sendMail
void sendMail(String text, String subject, String factory, javax.mail.Address[] recipients)
Sends a mail using the setting of this factory to this recipients.The context is passed to the sessionFactory to be able to find the session. Use the default session if context is not used. This template is used, replacing variables with the ones from this variables.
-
sendMail
void sendMail(String text, String subject, String factory, javax.mail.Address[] recipients, Map<String,Object> context)
-
getConnectedStore
javax.mail.Store getConnectedStore(String name) throws javax.mail.MessagingException
Returns a connected store for this factory. The store needs to be closed after use.- Parameters:
name
- The name of the factory that provides the properties.- Returns:
- the store.
- Throws:
javax.mail.MessagingException
-
getConnectedStore
javax.mail.Store getConnectedStore(String name, Map<String,Object> context) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
getConnectedTransport
javax.mail.Transport getConnectedTransport(String name) throws javax.mail.MessagingException
Returns a connected transport for this factory. The transport needs to be closed after use.- Parameters:
name
- the name of the factory that provides the properties.- Returns:
- the transport.
- Throws:
javax.mail.MessagingException
-
getConnectedTransport
javax.mail.Transport getConnectedTransport(String name, Map<String,Object> context) throws javax.mail.MessagingException
- Throws:
javax.mail.MessagingException
-
getSession
javax.mail.Session getSession(String name)
Returns a session for this factory, using the context to find the session or the default if no context is provided.
-
getFetcher
PropertiesFetcher getFetcher(String name)
-
-