Class MailService

java.lang.Object
com.kheops.jmap.server.MailService

public class MailService extends Object
  • Method Details

    • mailMap

      public static void mailMap(String from, String recipients, String subject, String bodyText, String lang, String imageFormat, byte[] image) throws Exception
      Throws:
      Exception
    • mailMap

      public static void mailMap(String from, javax.mail.Address[] addresses, String subject, String bodyText, String lang, String imageFormat, byte[] image) throws Exception
      Throws:
      Exception
    • sendMail

      public static void sendMail(javax.mail.Address[] to, String subject, String message, javax.mail.Address from) throws Exception
      Sends a text email to the specified recipients. Uses the existing connection to SMTP server as configured in JMapServer.
      Parameters:
      to - Recipient addresses
      subject - The subject of the message
      message - The text of the message
      from - Sender address
      Throws:
      Exception
    • sendMail

      public static void sendMail(javax.mail.Address[] to, String subject, String message, javax.mail.Address from, String host, short port, int encryption, String smtpUsername, String smtpPassword) throws Exception
      Sends a text email to the specified recipients. Uses the specified SMTP host, port and encryption
      Parameters:
      to - Recipient addresses
      subject - The subject of the message
      message - The text of the message
      from - Sender address
      host - The SMTP host
      port - The SMTP port
      encryption - The SMTP Encryption
      smtpUsername - The SMTP username
      smtpPassword - The SMTP password (not encrypted)
      Throws:
      Exception
    • toAddresses

      public static javax.mail.Address[] toAddresses(String recipients) throws javax.mail.internet.AddressException
      Converts a string containing email addresses separated by ';' to Address instances
      Parameters:
      recipients - the string containing the addresses
      Returns:
      an array of instances of Address
      Throws:
      javax.mail.internet.AddressException