Interface ZMail

All Known Implementing Classes:
ZSMTPMail

public interface ZMail
An interface for mail sending implementations.

Implementations of this interface must implement the configure() method to configure the mail system and the send() method to send a message.

Spiderwiz comes out of the box with an SMTP implementation. You can write your own plug-in implementation that will be activated by the framework with the class= parameter of [mail system] property in the application's configuration file.

See Also:
ZSMTPMail
  • Method Summary

    Modifier and Type Method Description
    void configure​(Map<String,​String> configParams)
    Configures the mail system using the given key=value mapping.
    void send​(String from, String to, String cc, String subject, String body, boolean html, boolean highPriority)
    Sends a mail according to the given parameters.
  • Method Details

    • configure

      void configure​(Map<String,​String> configParams)
      Configures the mail system using the given key=value mapping.

      When called from Spiderwiz framework the configuration map is parsed from the [mail&nbsp;system] property in the application's configuration file.

      Parameters:
      configParams - a map of key=value configuration parameters.
    • send

      void send​(String from, String to, String cc, String subject, String body, boolean html, boolean highPriority) throws Exception
      Sends a mail according to the given parameters.
      Parameters:
      from - the mail address of the sender.
      to - the mail address(es) of the addressee(s).
      cc - if not null, sends a carbon copy to the specified address(es).
      subject - the mail subject or null if there is no subject.
      body - the mail body or null if there is no body.
      html - true if the message shall be sent in HTML format, false if it shall be sent as plain text.
      highPriority - true if the message shall be flagged as high priority.
      Throws:
      Exception