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

    Modifier and Type
    Method
    Description
    com.smartfoxserver.config.MailerSettings
    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
    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 Details

    • sendMail

      void sendMail(Email email) throws org.simplejavamail.MailException
      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 Simple Mail core module(found under lib/sjm/coremodule-x.y.z.jar) to your project's libraries.

      Parameters:
      email - the email to send
      Throws:
      org.simplejavamail.MailException - an error might be caused by malformed email addresses either in the TO or FROM fields
      See Also:
    • sendMail

      void sendMail(Email email, IMailerCallbackHandler callBack) throws org.simplejavamail.MailException
      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 Simple Mail core module(found under lib/sjm/coremodule-x.y.z.jar) to your project's libraries.

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

      void sendMail(Email email, IMailerCallbackHandler callBack, int delaySeconds) throws org.simplejavamail.MailException
      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 Simple Mail core module(found under lib/sjm/coremodule-x.y.z.jar) 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:
      org.simplejavamail.MailException - an error might be caused by malformed email addresses either in the TO or FROM fields
      See Also:
    • getConfiguration

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