|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.cid.distribution.base.MessageHandlerBase org.cid.distribution.plugins.mail.SMTPHandler
public class SMTPHandler
A JavaMail based SMTP output channel implementation.
Constructor Summary | |
---|---|
SMTPHandler()
Class constructor. |
Method Summary | |
---|---|
static void |
addRules(org.apache.commons.digester.Digester d,
java.lang.String patternPrefix)
Configures additional rules for the commons-digester library. |
java.lang.String |
getCloseAfterMessages()
|
java.lang.String |
getHost()
Returns the SMTP host (evaluated). |
DistributionMail |
getMail()
|
int |
getMessagesSent()
|
int |
getPartialSent()
|
java.lang.String |
getPassword()
Returns the password used to open the SMTP connection (evaluated). |
java.lang.String |
getUsername()
Returns the username used to open the SMTP connection (evaluated). |
MessageEnumeration |
process(DistributionMessage message)
Sends a message through this channel |
void |
setCloseAfterMessages(java.lang.String closeAfterMessages)
This makes this SMTPHandler close the connection after a given number of messages sent to the server. |
void |
setHost(java.lang.String host)
Sets the SMTP host to use by this OutputChannel. |
void |
setMail(java.lang.String mail)
|
void |
setPassword(java.lang.String password)
Sets the password used to open the SMTP connection. |
void |
setUsername(java.lang.String username)
Sets the username used to open the SMTP connection. |
Methods inherited from class org.cid.distribution.base.MessageHandlerBase |
---|
destroy, getId, init, setDistributionContext, setId |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SMTPHandler()
Method Detail |
---|
public MessageEnumeration process(DistributionMessage message) throws DistributionProcessingException, DistributionConfigurationException
message
- The Message to send
DistributionProcessingException
DistributionConfigurationException
public static void addRules(org.apache.commons.digester.Digester d, java.lang.String patternPrefix)
public java.lang.String getCloseAfterMessages()
public void setCloseAfterMessages(java.lang.String closeAfterMessages)
This makes this SMTPHandler close the connection after a given number of messages sent to the server. The default si 0, which means never close the channel.
This option may be useful to avoid problems which some SMTP servers, which disconnect the client after sending a certain number of messages sent. Note that the server can disconnect a client for many reasons, see @see
closeAfterMessages
- The closeAfterMessages to set.
public java.lang.String getHost()
public void setHost(java.lang.String host)
host
- The SMTP host to use by this OutputChannel.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- The password used to open the SMTP connection.public java.lang.String getUsername()
public void setUsername(java.lang.String username)
username
- The username used to open the SMTP connection.public int getPartialSent()
public int getMessagesSent()
public DistributionMail getMail()
public void setMail(java.lang.String mail)
property
- The property to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |