Package lumis.portal.sendmail.smtp
Class SmtpMailSender
- java.lang.Object
-
- lumis.portal.sendmail.smtp.SmtpMailSender
-
- All Implemented Interfaces:
IMailSender
public class SmtpMailSender extends java.lang.Object implements IMailSender
Sends an e-mail using a SMTP connection.- Since:
- 4.0.4
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description SmtpMailSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.util.Collection<java.lang.String>
getEmailDestinationStringAsCollection(java.lang.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 java.util.Collection<java.lang.String> getEmailDestinationStringAsCollection(java.lang.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
-
-