SMTPclientpublic interface SMTPLibrary extends CMLibrary
| Modifier and Type | Interface | Description | 
|---|---|---|
| static interface  | SMTPLibrary.SMTPClient | Interface for the underlying smtp client class, as opposed to tbe big bad library with
 its fancy abstract methods. | 
| Modifier and Type | Field | Description | 
|---|---|---|
| static int | DEFAULT_PORT | Default port number | 
| static int | DEFAULT_TIMEOUT | default timeout | 
| static java.lang.String | EOL | network end of line | 
idConverter| Modifier and Type | Method | Description | 
|---|---|---|
| boolean | emailIfPossible(java.lang.String fromName,
               java.lang.String toName,
               java.lang.String subj,
               java.lang.String msg) | Attempts to send an email to the given recipient, using the INI file smtp server
 if available, or directly if not. | 
| boolean | emailIfPossible(java.lang.String SMTPServerInfo,
               java.lang.String from,
               java.lang.String replyTo,
               java.lang.String to,
               java.lang.String subject,
               java.lang.String message) | Attempts to connect to the given email server and send
 the given email to the given target address. | 
| void | emailOrJournal(java.lang.String from,
              java.lang.String replyTo,
              java.lang.String to,
              java.lang.String subject,
              java.lang.String message) | Sends an email or a journal message from a variety of argument formats. | 
| SMTPLibrary.SMTPClient | getClient(java.lang.String emailAddress) | Builds an smtp client based on the given email address for a target. | 
| SMTPLibrary.SMTPClient | getClient(java.lang.String SMTPServerInfo,
         int port) | Builds an smtp client based on the given host/port info. | 
| boolean | isValidEmailAddress(java.lang.String addy) | Checks the given string to see if it appears to be a valid email
 address. | 
activate, getServiceClient, L, propertiesLoaded, shutdowncopyOf, ID, initializeClass, name, newInstancestatic final int DEFAULT_PORT
static final java.lang.String EOL
static final int DEFAULT_TIMEOUT
boolean isValidEmailAddress(java.lang.String addy)
addy - the string to checkboolean emailIfPossible(java.lang.String SMTPServerInfo,
                        java.lang.String from,
                        java.lang.String replyTo,
                        java.lang.String to,
                        java.lang.String subject,
                        java.lang.String message)
                 throws java.io.IOException
SMTPServerInfo - the server hostname to connect through, or null to attempt a direct transmission.from - the from email addressreplyTo - the reply-to email addressto - the target email address, which may be used as a direct-connect host alsosubject - the subject of the messagemessage - the message itselfjava.io.IOException - any I/O errors that occuremailIfPossible(String, String, String, String), 
emailOrJournal(String, String, String, String, String)boolean emailIfPossible(java.lang.String fromName,
                        java.lang.String toName,
                        java.lang.String subj,
                        java.lang.String msg)
fromName - the from email addresstoName - the target email address, which may be used as a direct-connect host alsosubj - the subject of the messagemsg - the message itselfemailIfPossible(String, String, String, String, String, String), 
emailOrJournal(String, String, String, String, String)void emailOrJournal(java.lang.String from,
                    java.lang.String replyTo,
                    java.lang.String to,
                    java.lang.String subject,
                    java.lang.String message)
from - from character name, or from email addressreplyTo - reply to character name, or email addressto - target to character name, or email addresssubject - the subject of the messagemessage - the main messageemailIfPossible(String, String, String, String, String, String), 
emailIfPossible(String, String, String, String)SMTPLibrary.SMTPClient getClient(java.lang.String SMTPServerInfo, int port) throws java.net.UnknownHostException, java.io.IOException
SMTPServerInfo - the smtp server host with optional override portport - the port for the smtp serverjava.net.UnknownHostException - the smtp host couldn't be foundjava.io.IOException - any I/O errors that occurgetClient(String)SMTPLibrary.SMTPClient getClient(java.lang.String emailAddress) throws java.io.IOException, BadEmailAddressException
emailAddress - the email address to extract the smtp server host fromBadEmailAddressException - the email address was just badjava.io.IOException - any I/O errors that occurgetClient(String, int)