Interface IMailerService

  • All Superinterfaces:
    com.smartfoxserver.bitswarm.service.IService
    All Known Implementing Classes:
    SFSPostOffice

    public interface IMailerService
    extends com.smartfoxserver.bitswarm.service.IService
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.smartfoxserver.v2.config.MailerSettings getConfiguration()
      Obtain the configuration settings of the service
      void sendMail​(Email email)
      Sends the email to the recipient, or list of recipients, specified in the Email argument.
      void sendMail​(Email email, IMailerCallbackHandler callBack)
      Sends the email to the recipient, or list of recipients, specified in the Email argument and get an asynchronous event when the email is delivered.
      void sendMail​(Email email, IMailerCallbackHandler callBack, int delaySeconds)
      Sends an email in the future.
      • Methods inherited from interface com.smartfoxserver.bitswarm.service.IService

        destroy, getName, handleMessage, init, setName
    • Method Detail

      • sendMail

        void sendMail​(Email email)
               throws javax.mail.MessagingException
        Sends the email to the recipient, or list of recipients, specified in the Email argument.

        In order to send an email to multiple recipients the Email toAddress should contain comma-separated (and valid) email addresses. Don't use any blank spaces in the separation of each address.

        NOTE: Sending emails requires to add the mailapi.jar (found under SFS2X/lib/) to your project's libraries.

        Parameters:
        email - the email to send
        Throws:
        javax.mail.MessagingException - an error might be caused by malformed email addresses either in the TO or FROM fields
        See Also:
        SFSEmail
      • sendMail

        void sendMail​(Email email,
                      IMailerCallbackHandler callBack)
               throws javax.mail.MessagingException
        Sends the email to the recipient, or list of recipients, specified in the Email argument and get an asynchronous event when the email is delivered.

        In order to send an email to multiple recipients the Email toAddress should contain comma-separated (and valid) email addresses. Don't use any blank spaces in the separation of each address.

        NOTE: Sending emails requires to add the mailapi.jar (found under SFS2X/lib/) to your project's libraries.

        Parameters:
        email - the email to send
        callBack - the callback handler, if null no event will be fired
        Throws:
        javax.mail.MessagingException - an error might be caused by malformed email addresses either in the TO or FROM fields
        See Also:
        SFSEmail
      • sendMail

        void sendMail​(Email email,
                      IMailerCallbackHandler callBack,
                      int delaySeconds)
               throws javax.mail.MessagingException
        Sends an email in the future. The email can be sent to one recipient or a list of recipients specified in the Email argument. If a callback handler is provided the system will fire an asynchronous event when the email is delivered.

        In order to send an email to multiple recipients the Email toAddress should contain comma-separated (and valid) email addresses. Don't use any blank spaces in the separation of each address.

        NOTE: Sending emails requires to add the mailapi.jar (found under SFS2X/lib/) to your project's libraries.

        Parameters:
        email - the email to send
        callBack - the callback handler, if null no event will be fired
        delaySeconds - the amount of seconds to wait before sendint the mail
        Throws:
        javax.mail.MessagingException - an error might be caused by malformed email addresses either in the TO or FROM fields
        See Also:
        SFSEmail
      • getConfiguration

        com.smartfoxserver.v2.config.MailerSettings getConfiguration()
        Obtain the configuration settings of the service
        Returns:
        the configuration settings of the service