gov.ornl.mercury3.email_utils

## Class EmailGenerator

- java.lang.Object
- - gov.ornl.mercury3.email_utils.EmailGenerator

-     public class EmailGenerator
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `BODY`
    `static String` | `CC`
    `static String` | `DATE`
    `static String` | `EMAIL_LOG`
    `static String` | `FROM`
    `static String` | `HTML_EMAIL`
    `static int` | `HTML_TYPE`
    `static String` | `MAIL_HOST`
    `static int` | `PROJECT_ID`
    `static String` | `SMTP`
    `static String` | `SUBJECT`
    `static String` | `TEXT_EMAIL`
    `static int` | `TEXT_TYPE`
    `static String` | `TO`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `sendHTMLMail(String recipient, String subject, String message, String from)` Send HTML email to an individual
    `static void` | `sendHTMLMailWithLog(String recipient, String subject, String message, String from, String logFile)` Send text email to an individual also log the email info in a log file with a properties format.
    `static void` | `sendTextMail(String recipient, String subject, String message, String from)` Send Text email to an individual
    `static void` | `sendTextMailWithLog(String recipient, String subject, String message, String from, String logFile)` Send text email to an individual also log the email info in a log file with a properties format.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### SMTP

          public static final String SMTP

      See Also:
        Constant Field Values

    - #### MAIL_HOST

          public static final String MAIL_HOST

      See Also:
        Constant Field Values

    - #### TEXT_EMAIL

          public static final String TEXT_EMAIL

      See Also:
        Constant Field Values

    - #### HTML_EMAIL

          public static final String HTML_EMAIL

      See Also:
        Constant Field Values

    - #### TEXT_TYPE

          public static final int TEXT_TYPE

      See Also:
        Constant Field Values

    - #### HTML_TYPE

          public static final int HTML_TYPE

      See Also:
        Constant Field Values

    - #### DATE

          public static final String DATE

      See Also:
        Constant Field Values

    - #### FROM

          public static final String FROM

      See Also:
        Constant Field Values

    - #### TO

          public static final String TO

      See Also:
        Constant Field Values

    - #### CC

          public static final String CC

      See Also:
        Constant Field Values

    - #### SUBJECT

          public static final String SUBJECT

      See Also:
        Constant Field Values

    - #### BODY

          public static final String BODY

      See Also:
        Constant Field Values

    - #### EMAIL_LOG

          public static final String EMAIL_LOG

      See Also:
        Constant Field Values

    - #### PROJECT_ID

          public static final int PROJECT_ID

      See Also:
        Constant Field Values

  - ### Method Detail

    - #### sendTextMail

          public static void sendTextMail(String recipient,
                          String subject,
                          String message,
                          String from)
                                   throws javax.mail.MessagingException

      Send Text email to an individual
      Parameters:
        `from` - The sender's email
        `recipient` - The intended recipient of the message
        `subject` - The subject of the message
        `message` - The body of the message
      Throws:
        `javax.mail.MessagingException`

    - #### sendTextMailWithLog

          public static void sendTextMailWithLog(String recipient,
                                 String subject,
                                 String message,
                                 String from,
                                 String logFile)
                                          throws javax.mail.MessagingException

      Send text email to an individual also log the email info in a log file with a properties format.
      Parameters:
        `from` - The sender's email
        `recipient` - The intended recipient of the message
        `subject` - The subject of the message
        `message` - The body of the message(the HTML part)
        `LogFile` - Property file where the email will be logged
      Throws:
        `javax.mail.MessagingException`

    - #### sendHTMLMail

          public static void sendHTMLMail(String recipient,
                          String subject,
                          String message,
                          String from)
                                   throws javax.mail.MessagingException

      Send HTML email to an individual
      Parameters:
        `from` - The sender's email
        `recipient` - The intended recipient of the message
        `subject` - The subject of the message
        `message` - The body of the message
      Throws:
        `javax.mail.MessagingException`

    - #### sendHTMLMailWithLog

          public static void sendHTMLMailWithLog(String recipient,
                                 String subject,
                                 String message,
                                 String from,
                                 String logFile)
                                          throws javax.mail.MessagingException

      Send text email to an individual also log the email info in a log file with a properties format.
      Parameters:
        `from` - The sender's email
        `recipient` - The intended recipient of the message
        `subject` - The subject of the message
        `message` - The body of the message(the HTML part)
        `LogFile` - Property file where the email will be logged
      Throws:
        `javax.mail.MessagingException`

Copyright © 2016. All rights reserved.