| 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

java.lang.Objecttoolbox.allegato.MailConfig
public class MailConfig
Class to encapsulate JavaMail Session configuration settings and Session creation. Mail configuration settings are obtained from a XML configuration document.
| Nested Class Summary | |
|---|---|
(package private)  class | 
MailConfig.SimpleMailAuthenticator
Authenticator subclass to perform user name/password authentication.  | 
| Constructor Summary | |
|---|---|
MailConfig()
Default constructor  | 
|
MailConfig(java.lang.String name,
           XMLProperties xmlProps)
Create a new MailConfig instance with the given name and mail configuration.  | 
|
| Method Summary | |
|---|---|
 javax.mail.Session | 
createSessionForSMTP()
Create and return a mail Session for SMTP based on the SMTP properties of this MailConfig instance.  | 
 java.lang.String | 
getSMTPAuth()
Return the SMTP auth required flag.  | 
 java.lang.String | 
getSMTPHost()
Return the SMTP host name.  | 
 java.lang.String | 
getSMTPPassword()
Return the SMTP user password.  | 
 java.lang.String | 
getSMTPPort()
Return the SMTP port number.  | 
 java.util.Map | 
getSMTPProperties()
Return additional supported SMTP properties.  | 
 java.lang.String | 
getSMTPProtocol()
Return the SMTP protocol.  | 
 java.lang.String | 
getSMTPUser()
Return the SMTP user name.  | 
 void | 
setSMTPAuth(java.lang.String auth)
Set the the SMTP auth required flag.  | 
 void | 
setSMTPHost(java.lang.String host)
Set the SMTP host name.  | 
 void | 
setSMTPPassword(java.lang.String password)
Set the SMTP user password.  | 
 void | 
setSMTPPort(java.lang.String port)
Set the SMTP port number.  | 
 void | 
setSMTPProperty(java.lang.String name,
                java.lang.String val)
Set an additional supported SMTP property.  | 
 void | 
setSMTPProtocol(java.lang.String proto)
Set the SMTP protocol.  | 
 void | 
setSMTPUser(java.lang.String user)
Set the SMTP user name.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public MailConfig()
public MailConfig(java.lang.String name,
                  XMLProperties xmlProps)
           throws ConfException
name - String containing the name of the mail configuration.xmlProps - XML configuration properties.
ConfException - if the configuration cannot be initialised.| Method Detail | 
|---|
public java.lang.String getSMTPProtocol()
public java.lang.String getSMTPHost()
public java.lang.String getSMTPPort()
public java.lang.String getSMTPAuth()
public java.lang.String getSMTPUser()
public java.lang.String getSMTPPassword()
public java.util.Map getSMTPProperties()
public void setSMTPProtocol(java.lang.String proto)
proto - String containing SMTP protocol.public void setSMTPHost(java.lang.String host)
host - String containing SMTP server name.public void setSMTPPort(java.lang.String port)
port - String containing SMTP port number.public void setSMTPAuth(java.lang.String auth)
auth - String containing the SMTP auth flag. true|false.public void setSMTPUser(java.lang.String user)
user - String containing SMTP user name.public void setSMTPPassword(java.lang.String password)
password - String containing the password of the SMTP user.
public void setSMTPProperty(java.lang.String name,
                            java.lang.String val)
name - String containig the name of the SMTP property.val - String containing the value of the SMTP property.public javax.mail.Session createSessionForSMTP()
  | 
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||