Package org.openbravo.email
Class EmailEventManager
- java.lang.Object
-
- org.openbravo.email.EmailEventManager
-
@ApplicationScoped public class EmailEventManager extends Object
This singleton class, is in charge of generating events to send emails.- Author:
- asier
- See Also:
EmailEventContentGenerator
-
-
Constructor Summary
Constructors Constructor Description EmailEventManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
sendEmail(String event, String recipient, Object data)
This method is invoked when an event for sending emails is generated.
-
-
-
Method Detail
-
sendEmail
public boolean sendEmail(String event, String recipient, Object data) throws EmailEventException
This method is invoked when an event for sending emails is generated. It looks for allEmailEventContentGenerator
classes listening to this event and generates an email using them.- Parameters:
event
- Name of the event to send emails forrecipient
- Email address of the email's recipientdata
- Object that the EmailEventContentGenerator will receive to generate the email- Returns:
true
in case at least one email has been sent- Throws:
EmailEventException
- is thrown in case of problems sending the email or getting the email server configuration- See Also:
EmailEventContentGenerator
-
-