Interface MailService


public interface MailService
Service interface for sending mails via the server.
Use getService(MailService.class) to request an instance of this service.
Since:
4.0
See Also:
  • Field Details

  • Method Details

    • sendMail

      void sendMail(String recipient, String subject, String message)
      Send a textual mail the set recipient(s), where the message is assumed to be of type "plain". The sender will be the one defined by the server.
      Parameters:
      recipient - A semicolon-separated list of recipients.
      subject - The subject for the mail.
      message - The textual message to be send.
      Since:
      4.0
    • sendMail

      void sendMail(String sender, String recipient, String subject, String message)
      Send a textual mail using the given sender name to the set recipient(s), where the message is assumed to be of type "plain".
      Parameters:
      sender - The sender of the mail.
      recipient - A semicolon-separated list of recipients.
      subject - The subject for the mail.
      message - The textual message to be send.
      Since:
      4.0
    • sendMail

      void sendMail(String sender, String recipient, String subject, String message, String subType)
      Send a textual mail using the given sender name to the set recipient(s).
      Parameters:
      sender - The sender of the mail.
      recipient - A semicolon-separated list of recipients.
      subject - The subject for the mail.
      message - The textual message to be send.
      subType - sub type ("plain" for example)
      Since:
      4.0
    • sendMail

      void sendMail(String recipient, String subject, String message, Attachment... attachments)
      Send a mail the set recipient(s), where the message is assumed to be of type "plain". The sender will be the one defined by the server.
      Parameters:
      recipient - A semicolon-separated list of recipients.
      subject - The subject for the mail.
      message - The textual message to be send.
      attachments - Any number of attachments, which base on files or input streams.
      Since:
      4.0
    • sendMail

      void sendMail(String sender, String recipient, String subject, String message, boolean synchronous, Attachment... attachments)
      Send a mail using the given sender name to the set recipient(s), where the message is assumed to be of type "plain".
      Parameters:
      sender - The sender of the mail.
      recipient - A semicolon-separated list of recipients.
      subject - The subject for the mail.
      message - The textual message to be send.
      synchronous - true, if mail should be send synchronous, and false if should be send in a separated thread
      attachments - Any number of attachments, which base on files or
      Since:
      4.0
    • sendMail

      void sendMail(String sender, String recipient, String subject, String message, String subType, boolean synchronous, Attachment... attachments) throws SendMailException
      Send a mail using the given sender name to the set recipient(s).
      Parameters:
      sender - The sender of the mail.
      recipient - A semicolon-separated list of recipients.
      subject - The subject for the mail.
      message - The textual message to be send.
      subType - The type of message, either "plain" or "html".
      attachments - Any number of attachments, which base on files or input streams. @throws SendMailException when sending mail failure
      synchronous - true, if mail should be send synchronous, and false if should be send in a separated thread
      Throws:
      SendMailException - if mail could not be sent, cause an error occured
      Since:
      4.0
    • sendMail

      void sendMail(MailHeader mailHeader, String subject, String message, Attachment... attachments) throws SendMailException
      Send a mail using the given configured mail header.
      Parameters:
      mailHeader - The configured mail header.
      subject - The subject for the mail.
      message - The textual message to be send.
      attachments - Any number of attachments, which base on files or input streams.
      Throws:
      SendMailException - when sending mail failure
      Since:
      4.1.10
    • sendMail

      void sendMail(MailHeader mailHeader, String subject, String message, String subType, boolean synchronous, Attachment... attachments) throws SendMailException
      Send a mail using the given configured mail header and the set type of the message.
      Parameters:
      mailHeader - The configured mail header.
      subject - The subject for the mail.
      message - The textual message to be send.
      subType - The type of message, either "plain" or "html".
      attachments - Any number of attachments, which base on files or input streams. @throws SendMailException when sending mail failure
      Throws:
      SendMailException
      Since:
      4.1.10