# com.bea.p13n.mail
MailManager Class

public class MailManager
extends `Object`

Command-line interface to manager mail batches, through the MailService session bean.

Command line arguments include:

- -action <action>: Can be "list", "send", or "delete"; defaults to "list". Without any other args, an action of "list" will list all batches; combined with a batch name, it will list the messages in that batch. An action of "send" will send all the messages in the batch; if the "delete" flag is also present, it will delete the batch after sending. An action of "delete" will delete the batch and all messages in the batch.
- -batch <name>: The name of the batch to list, send, or delete, depending on the provided action.
- -delete: A flag to delete the batch after sending
- -providerURL <url>: The URL to use for JNDI lookups; defaults to the local system
- -contextFactory <class>: JNDI Context Factory class; defaults to `weblogic.jndi.WLInitialContextFactory`.
- -jndiName <name>: the JNDI name of the MailService to use
- -appName <name>: the name of application on the server to work in. This will be used if -jndiName is not specified. One of either jndiName of appName is required.
- -username <name>: username to connect as. Optional, defaults to "guest".
- -password <password>: password to use, if a username is provided.

Hierarchy
  `Object`
  `MailManager`

## Field Summary

`protected static final `String`` | `DEFAULT_INITIAL_CONTEXT_FACTORY` String
`protected static final `String`` | `DEFAULT_PROVIDER_URL` String
`public static final `String`` | `DELETE_ACTION` String
`public static final `String`` | `LIST_ACTION` String
`protected static final `String`` | `MAIL_SERVICE_BASE` String
`public static final `String`` | `SEND_ACTION` String

## Constructor Summary

MailManager()

## Method Summary

`public static void` | `main`(`String`[] args) Execute this program See the class notes for details about the command-line arguments.

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Detail

### DEFAULT_INITIAL_CONTEXT_FACTORY

    protected static final String DEFAULT_INITIAL_CONTEXT_FACTORY

### DEFAULT_PROVIDER_URL

    protected static final String DEFAULT_PROVIDER_URL

### DELETE_ACTION

    public static final String DELETE_ACTION

### LIST_ACTION

    public static final String LIST_ACTION

### MAIL_SERVICE_BASE

    protected static final String MAIL_SERVICE_BASE

### SEND_ACTION

    public static final String SEND_ACTION

## Constructor Detail

### MailManager

    public MailManager()

## Method Detail

### main(String[]) Method

    public static void main(String[] args)

Execute this program

See the class notes for details about the command-line arguments.

#### Parameters

args
  the command-line arguments.