Interface MailService
- All Known Implementing Classes:
MailServiceImpl
public interface MailService
- Author:
- Alexandre Russel
-
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.StoregetConnectedStore(String name) Returns a connected store for this factory.jakarta.mail.StoregetConnectedStore(String name, Map<String, Object> context) jakarta.mail.TransportgetConnectedTransport(String name) Returns a connected transport for this factory.jakarta.mail.TransportgetConnectedTransport(String name, Map<String, Object> context) getFetcher(String name) getMailBoxActions(String factoryName, String folderName) Returns an actions pipe configured with this factory.Gets the pipe of actions for given namejakarta.mail.SessiongetSession(String name) Returns a session for this factory, using the context to find the session or the default if no context is provided.jakarta.mail.SessiongetSession(String name, Map<String, Object> context) voidSends a mail using the setting of this factory to this recipients.voidsendMail(String text, String subject, String factory, jakarta.mail.Address[] recipients, Map<String, Object> context)
-
Method Details
-
getMailBoxActions
MailBoxActions getMailBoxActions(String factoryName, String folderName) throws jakarta.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:
jakarta.mail.MessagingException
-
getMailBoxActions
MailBoxActions getMailBoxActions(String factoryName, String folderName, Map<String, Object> context) throws jakarta.mail.MessagingException- Throws:
jakarta.mail.MessagingException
-
getPipe
Gets the pipe of actions for given name -
sendMail
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
-
getConnectedStore
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:
jakarta.mail.MessagingException
-
getConnectedStore
jakarta.mail.Store getConnectedStore(String name, Map<String, Object> context) throws jakarta.mail.MessagingException- Throws:
jakarta.mail.MessagingException
-
getConnectedTransport
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:
jakarta.mail.MessagingException
-
getConnectedTransport
jakarta.mail.Transport getConnectedTransport(String name, Map<String, Object> context) throws jakarta.mail.MessagingException- Throws:
jakarta.mail.MessagingException
-
getSession
Returns a session for this factory, using the context to find the session or the default if no context is provided. -
getSession
-
getFetcher
-