Package lumis.portal.sendmail.smtp
Class SmtpMailSender
- java.lang.Object
-
- lumis.portal.sendmail.smtp.SmtpMailSender
-
- All Implemented Interfaces:
IMailSender
public class SmtpMailSender extends Object implements IMailSender
Sends an e-mail using a SMTP connection.- Since:
- 4.0.4
- Version:
- $Revision: 24291 $ $Date: 2020-12-14 19:00:39 -0300 (Mon, 14 Dec 2020) $
-
-
Constructor Summary
Constructors Constructor Description SmtpMailSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Collection<String>
getEmailDestinationStringAsCollection(String destination)
Translates an email destination string into a collection of Strings, each one contaning an email destination.protected IMailConfig
getMailConfig()
Returns the MailConfig with the configurations to be used when sending the e-mail.void
sendMail(SessionConfig sessionConfig, ISingleMail mail, ITransaction transaction)
Sends a mail.
-
-
-
Method Detail
-
sendMail
public void sendMail(SessionConfig sessionConfig, ISingleMail mail, ITransaction transaction) throws PortalException
Description copied from interface:IMailSender
Sends a mail.- Specified by:
sendMail
in interfaceIMailSender
- Parameters:
sessionConfig
- the user session informationmail
- information about the mail to be sent.transaction
- the transaction for persistence access.- Throws:
PortalException
- if it was not possible to send the mail.
-
getMailConfig
protected IMailConfig getMailConfig() throws PortalException
Returns the MailConfig with the configurations to be used when sending the e-mail.- Returns:
- the MailConfig.
- Throws:
PortalException
- if the MailConfig could not be obtained.- Since:
- 4.0.4
-
getEmailDestinationStringAsCollection
protected Collection<String> getEmailDestinationStringAsCollection(String destination)
Translates an email destination string into a collection of Strings, each one contaning an email destination. The email destination string may contain several emails separated by comma or semi-colon.- Parameters:
destination
- the email destination string.- Returns:
- a collection of strings, where each string is one email in the given email destination string.
- Since:
- 4.0.4
-
-