public class MailFactory extends java.lang.Object implements MailFactoryIF
| Modifier and Type | Class and Description |
|---|---|
protected class |
MailFactory.SimpleAuthenticator
The authenticator for the mailer.
|
| Modifier and Type | Method and Description |
|---|---|
javax.mail.Message |
createMessage(XSDContextIF ctx,
Mail mail)
Create a predefined message defined XML section.
|
javax.mail.Message.RecipientType |
createRecipientType(java.lang.String type)
Create a recipient type object from a recipient type string.
|
javax.mail.Session |
createSession(java.util.Properties props,
java.lang.String host,
java.lang.String protocol,
java.lang.String port,
java.lang.String user,
java.lang.String password,
java.lang.String from,
boolean authentication,
boolean debug)
Create a mail session.
|
static MailFactory |
getInstance()
Get an instance of a factory.
|
public static MailFactory getInstance()
public javax.mail.Message createMessage(XSDContextIF ctx, Mail mail) throws javax.mail.MessagingException, javax.mail.internet.AddressException
createMessage in interface MailFactoryIFmail - the xml definition of the mailctx - the MoMa context.javax.mail.MessagingExceptionjavax.mail.internet.AddressExceptionpublic javax.mail.Session createSession(java.util.Properties props,
java.lang.String host,
java.lang.String protocol,
java.lang.String port,
java.lang.String user,
java.lang.String password,
java.lang.String from,
boolean authentication,
boolean debug)
createSession in interface MailFactoryIFhost - The host of the mail server.protocol - the protocol of the mail server.port - the port of the mail server.user - the username of the mail server.password - the password (neccessary if authentication is required only).from - the from addressauthentication - if true an authentication is necessary.debug - if true>/em> debug information will be printed from the underlying system.props - properties that are passed directly to the mail implementation.public javax.mail.Message.RecipientType createRecipientType(java.lang.String type)
createRecipientType in interface MailFactoryIFtype - the type string.