Class 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: 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 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SmtpMailSender

        public SmtpMailSender()
    • Method Detail

      • 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