Class MailNotification

java.lang.Object
com.netscape.cms.notification.MailNotification

public class MailNotification extends Object
This class handles mail notification via SMTP. This class uses smtp.host in the configuration for smtp host. The port default (25) is used. If no smtp specified, local host is used
  • Field Details

  • Constructor Details

    • MailNotification

      public MailNotification()
  • Method Details

    • getHost

      public String getHost()
    • setHost

      public void setHost(String host)
    • sendNotification

      public void sendNotification() throws IOException, ENotificationException
      send one message to one or more addressees
      Throws:
      IOException
      ENotificationException
    • setFrom

      public void setFrom(String from)
      sets the "From" field
      Parameters:
      from - email address of the sender
    • setSubject

      public void setSubject(String subject)
      sets the "Subject" field
      Parameters:
      subject - subject of the email
    • setContentType

      public void setContentType(String contentType)
      sets the "Content-Type" field
      Parameters:
      contentType - content type of the email
    • setContent

      public void setContent(String content)
      sets the content of the email
      Parameters:
      content - the message content
    • setTo

      public void setTo(Vector<String> addresses)
      sets the recipients' email addresses
      Parameters:
      addresses - a list of email addresses of the recipients
    • setTo

      public void setTo(String to)
      sets the recipient's email address
      Parameters:
      to - address of the recipient email address