org.apache.geronimo.mail
Class SMTPTransportGBean

java.lang.Object
  extended by org.apache.geronimo.mail.ProtocolGBean
      extended by org.apache.geronimo.mail.SMTPTransportGBean
All Implemented Interfaces:
org.apache.geronimo.gbean.GBeanLifecycle

public class SMTPTransportGBean
extends ProtocolGBean

A GBean that provides for the configuration of a JavaMail SMTP transport protocol.

SMTP transport properties that are common to all SMTP transports are provided via member variables of this class. Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set.

See Also:
MailGBean

Field Summary
static String GBEAN_8BITMIME
           
static String GBEAN_DSN_NOTIFY
           
static String GBEAN_DSN_RET
           
static String GBEAN_EHLO
           
static org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
           
static String GBEAN_MAIL_EXTENSION
           
static String GBEAN_REPORT_SUCCESS
           
static String GBEAN_SEND_PARTIAL
           
static String GBEAN_STARTTLS_ENABLE
           
static String GBEAN_SUBMITTER
           
static String SMTP_8BITMIME
           
static String SMTP_AUTH
           
static String SMTP_CONNECTION_TIMEOUT
           
static String SMTP_DSN_NOTIFY
           
static String SMTP_DSN_RET
           
static String SMTP_EHLO
           
static String SMTP_FACTORY_CLASS
           
static String SMTP_FACTORY_FALLBACK
           
static String SMTP_FACTORY_PORT
           
static String SMTP_FROM
           
static String SMTP_LOCALADDRESS
           
static String SMTP_LOCALHOST
           
static String SMTP_LOCALPORT
           
static String SMTP_MAIL_EXTENSION
           
static String SMTP_PORT
           
static String SMTP_QUITWAIT
           
static String SMTP_REALM
           
static String SMTP_REPORT_SUCCESS
           
static String SMTP_SEND_PARTIAL
           
static String SMTP_STARTTLS_ENABLE
           
static String SMTP_SUBMITTER
           
static String SMTP_TIMEOUT
           
 
Fields inherited from class org.apache.geronimo.mail.ProtocolGBean
GBEAN_ADD_OVERRIDES, GBEAN_AUTH, GBEAN_CONNECTION_TIMEOUT, GBEAN_FACTORY_CLASS, GBEAN_FACTORY_FALLBACK, GBEAN_FACTORY_PORT, GBEAN_FROM, GBEAN_HOST, GBEAN_LOCALADDRESS, GBEAN_LOCALHOST, GBEAN_LOCALPORT, GBEAN_OBJECTNAME, GBEAN_PORT, GBEAN_PROPERTIES, GBEAN_PROTOCOL, GBEAN_QUITWAIT, GBEAN_REALM, GBEAN_TIMEOUT, GBEAN_USER
 
Constructor Summary
SMTPTransportGBean(String objectName, Properties properties, String host, String user, Integer port, Integer connectionTimeout, Integer timeout, String from, String localhost, String localaddress, Integer localport, Boolean ehlo, Boolean auth, Boolean startTLSEnable, String submitter, String dsnNotify, String dsnRet, Boolean allow8bitmime, Boolean sendPartial, String saslRealm, Boolean quitWait, Boolean reportSuccess, String socketFactoryClass, Boolean socketFactoryFallback, Integer socketFactoryPort, String mailExtension)
          Construct an instance of SMTPTransportGBean

Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set.

 
Method Summary
 void addOverrides(Properties props)
          Add the overrides from the member variables to the properties file.
 void doFail()
           
 void doStart()
           
 void doStop()
           
 Boolean getAllow8bitmime()
          Returns whether encodings are converted to use "8bit" under certain conditions.
 Boolean getAuth()
          Returns whether an attempt will be made to authenticate the user using the AUTH command.
 Integer getConnectionTimeout()
          Returns the socket connection timeout value in milliseconds.
 String getDsnNotify()
          Returns the NOTIFY option to the RCPT command.
 String getDsnRet()
          Returns the RET option to the MAIL command.
 Boolean getEhlo()
          Returns whether an attempt will be made to sign on with the EHLO command.
 String getFrom()
          Returns the email address to use for SMTP MAIL command.
static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()
           
 String getLocaladdress()
          Returns the local address (host name) to bind to when creating the SMTP socket.
 String getLocalhost()
          Returns the local host name used in the SMTP HELO or EHLO command.
 Integer getLocalport()
          Returns the local port number to bind to when creating the SMTP socket.
 String getMailExtension()
          Returns the extension string to append to the MAIL command.
 Integer getPort()
          Returns the SMTP server port to connect to, if the connect() method doesn't explicitly specify one.
 Boolean getQuitWait()
          Returns whether the transport will wait for the response to the QUIT command.
 Boolean getReportSuccess()
          Returns whether the transport will include an SMTPAddressSucceededException for each address that is successful.
 String getSaslRealm()
          Returns the realm to use with DIGEST-MD5 authentication.
 Boolean getSendPartial()
          Returns whether to send email to valid addresses when others are invalid.
 String getSocketFactoryClass()
          Returns the class that will be used to create SMTP sockets.
 Boolean getSocketFactoryFallback()
          Returns whether java.net.Socket class will be created if the specified socket factory class cannot be created.
 Integer getSocketFactoryPort()
          Returns the port to connect to when using the specified socket factory.
 Boolean getStartTLSEnable()
          Returns the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.
 String getSubmitter()
          Returns the submitter to use in the AUTH tag in the MAIL FROM command.
 Integer getTimeout()
          Returns the socket I/O timeout value in milliseconds.
 void setAllow8bitmime(Boolean allow8bitmime)
          Sets whether encodings are converted to use "8bit" under certain conditions.
 void setAuth(Boolean auth)
          Sets whether an attempt will be made to authenticate the user using the AUTH command.
 void setConnectionTimeout(Integer connectionTimeout)
          Sets the socket connection timeout value in milliseconds.
 void setDsnNotify(String dsnNotify)
          Sets the NOTIFY option to the RCPT command

Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY (separated by commas).

 void setDsnRet(String dsnRet)
          Sets the RET option to the MAIL command

Either FULL or HDRS.

 void setEhlo(Boolean ehlo)
          Set whether an attempt will be made to sign on with the EHLO command.
 void setFrom(String from)
          Sets the email address to use for SMTP MAIL command

Email address to use for SMTP MAIL command.

 void setLocaladdress(String localaddress)
          Sets the local address (host name) to bind to when creating the SMTP socket.
 void setLocalhost(String localhost)
          Sets the local host name used in the SMTP HELO or EHLO command.
 void setLocalport(Integer localport)
          Sets the local port number to bind to when creating the SMTP socket.
 void setMailExtension(String mailExtension)
          Sets the extension string to append to the MAIL command.
 void setPort(Integer port)
          Sets the SMTP server port to connect to, if the connect() method doesn't explicitly specify one.
 void setQuitWait(Boolean quitWait)
          Sets whether the transport will wait for the response to the QUIT command

If set to true, causes the transport to wait for the response to the QUIT command.

 void setReportSuccess(Boolean reportSuccess)
          Sets whether the transport will include an SMTPAddressSucceededException for each address that is successful.
 void setSaslRealm(String saslRealm)
          Sets the realm to use with DIGEST-MD5 authentication.
 void setSendPartial(Boolean sendPartial)
          Sets whether to send email to valid addresses when others are invalid.
 void setSocketFactoryClass(String socketFactoryClass)
          Sets the class that will be used to create SMTP sockets.
 void setSocketFactoryFallback(Boolean socketFactoryFallback)
          Sets whether java.net.Socket class will be created if the specified socket factory class cannot be created.
 void setSocketFactoryPort(Integer socketFactoryPort)
          Sets the port to connect to when using the specified socket factory.
 void setStartTLSEnable(Boolean startTLSEnable)
          Sets the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.
 void setSubmitter(String submitter)
          Sets the submitter to use in the AUTH tag in the MAIL FROM command.
 void setTimeout(Integer timeout)
          Sets the socket I/O timeout value in milliseconds.
 
Methods inherited from class org.apache.geronimo.mail.ProtocolGBean
getHost, getObjectName, getProperties, getProtocol, getUser, setHost, setProperties, setUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SMTP_PORT

public static final String SMTP_PORT
See Also:
Constant Field Values

SMTP_CONNECTION_TIMEOUT

public static final String SMTP_CONNECTION_TIMEOUT
See Also:
Constant Field Values

SMTP_TIMEOUT

public static final String SMTP_TIMEOUT
See Also:
Constant Field Values

SMTP_FROM

public static final String SMTP_FROM
See Also:
Constant Field Values

SMTP_AUTH

public static final String SMTP_AUTH
See Also:
Constant Field Values

SMTP_REALM

public static final String SMTP_REALM
See Also:
Constant Field Values

SMTP_QUITWAIT

public static final String SMTP_QUITWAIT
See Also:
Constant Field Values

SMTP_FACTORY_CLASS

public static final String SMTP_FACTORY_CLASS
See Also:
Constant Field Values

SMTP_FACTORY_FALLBACK

public static final String SMTP_FACTORY_FALLBACK
See Also:
Constant Field Values

SMTP_FACTORY_PORT

public static final String SMTP_FACTORY_PORT
See Also:
Constant Field Values

SMTP_LOCALHOST

public static final String SMTP_LOCALHOST
See Also:
Constant Field Values

SMTP_LOCALADDRESS

public static final String SMTP_LOCALADDRESS
See Also:
Constant Field Values

SMTP_LOCALPORT

public static final String SMTP_LOCALPORT
See Also:
Constant Field Values

SMTP_EHLO

public static final String SMTP_EHLO
See Also:
Constant Field Values

SMTP_SUBMITTER

public static final String SMTP_SUBMITTER
See Also:
Constant Field Values

SMTP_DSN_NOTIFY

public static final String SMTP_DSN_NOTIFY
See Also:
Constant Field Values

SMTP_DSN_RET

public static final String SMTP_DSN_RET
See Also:
Constant Field Values

SMTP_8BITMIME

public static final String SMTP_8BITMIME
See Also:
Constant Field Values

SMTP_SEND_PARTIAL

public static final String SMTP_SEND_PARTIAL
See Also:
Constant Field Values

SMTP_REPORT_SUCCESS

public static final String SMTP_REPORT_SUCCESS
See Also:
Constant Field Values

SMTP_MAIL_EXTENSION

public static final String SMTP_MAIL_EXTENSION
See Also:
Constant Field Values

SMTP_STARTTLS_ENABLE

public static final String SMTP_STARTTLS_ENABLE
See Also:
Constant Field Values

GBEAN_EHLO

public static final String GBEAN_EHLO
See Also:
Constant Field Values

GBEAN_SUBMITTER

public static final String GBEAN_SUBMITTER
See Also:
Constant Field Values

GBEAN_DSN_NOTIFY

public static final String GBEAN_DSN_NOTIFY
See Also:
Constant Field Values

GBEAN_DSN_RET

public static final String GBEAN_DSN_RET
See Also:
Constant Field Values

GBEAN_8BITMIME

public static final String GBEAN_8BITMIME
See Also:
Constant Field Values

GBEAN_SEND_PARTIAL

public static final String GBEAN_SEND_PARTIAL
See Also:
Constant Field Values

GBEAN_REPORT_SUCCESS

public static final String GBEAN_REPORT_SUCCESS
See Also:
Constant Field Values

GBEAN_MAIL_EXTENSION

public static final String GBEAN_MAIL_EXTENSION
See Also:
Constant Field Values

GBEAN_STARTTLS_ENABLE

public static final String GBEAN_STARTTLS_ENABLE
See Also:
Constant Field Values

GBEAN_INFO

public static final org.apache.geronimo.gbean.GBeanInfo GBEAN_INFO
Constructor Detail

SMTPTransportGBean

public SMTPTransportGBean(String objectName,
                          Properties properties,
                          String host,
                          String user,
                          Integer port,
                          Integer connectionTimeout,
                          Integer timeout,
                          String from,
                          String localhost,
                          String localaddress,
                          Integer localport,
                          Boolean ehlo,
                          Boolean auth,
                          Boolean startTLSEnable,
                          String submitter,
                          String dsnNotify,
                          String dsnRet,
                          Boolean allow8bitmime,
                          Boolean sendPartial,
                          String saslRealm,
                          Boolean quitWait,
                          Boolean reportSuccess,
                          String socketFactoryClass,
                          Boolean socketFactoryFallback,
                          Integer socketFactoryPort,
                          String mailExtension)
Construct an instance of SMTPTransportGBean

Values that are set in the individual member variables will override any of the corresponding values that have been set in the properties set.

Parameters:
objectName - the object name of the protocol
properties - the set of default properties for the protocol
host - the host the protocol connects to
user - the default name for the protocol
port - the SMTP server port
connectionTimeout - the socket connection timeout value in milliseconds
timeout - the socket I/O timeout value in milliseconds
from - the email address to use for SMTP MAIL command
localhost - the local host name used in the SMTP HELO or EHLO command
localaddress - the local address (host name) to bind to when creating the SMTP socket
localport - the local port number to bind to when creating the SMTP socket
ehlo - whether an attempt will be made to sign on with the EHLO command
auth - whether an attempt will be made to authenticate the user using the AUTH command
startTLSEnable - the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands
submitter - the submitter to use in the AUTH tag in the MAIL FROM command
dsnNotify - the NOTIFY option to the RCPT command
dsnRet - the RET option to the MAIL command
allow8bitmime - whether encodings are converted to use "8bit" under certain conditions
sendPartial - whether to send email to valid addresses when others are invalid
saslRealm - the realm to use with DIGEST-MD5 authentication
quitWait - whether the transport will wait for the response to the QUIT command
reportSuccess - whether the transport will include an SMTPAddressSucceededException for each address that is successful
socketFactoryClass - the class that will be used to create SMTP sockets
socketFactoryFallback - whether java.net.Socket class will be created if the specified socket factory class cannot be created
socketFactoryPort - whether java.net.Socket class will be created if the specified socket factory class cannot be created
mailExtension - the extension string to append to the MAIL command
Method Detail

getPort

public Integer getPort()
Returns the SMTP server port to connect to, if the connect() method doesn't explicitly specify one.


setPort

public void setPort(Integer port)
Sets the SMTP server port to connect to, if the connect() method doesn't explicitly specify one.

Defaults to 25.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
port - the SMTP server port to connect to

getConnectionTimeout

public Integer getConnectionTimeout()
Returns the socket connection timeout value in milliseconds.


setConnectionTimeout

public void setConnectionTimeout(Integer connectionTimeout)
Sets the socket connection timeout value in milliseconds.

Default is infinite timeout.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
connectionTimeout - the socket connection timeout value in milliseconds.

getTimeout

public Integer getTimeout()
Returns the socket I/O timeout value in milliseconds.


setTimeout

public void setTimeout(Integer timeout)
Sets the socket I/O timeout value in milliseconds.

Default is infinite timeout.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
timeout - the socket I/O timeout value in milliseconds

getFrom

public String getFrom()
Returns the email address to use for SMTP MAIL command.


setFrom

public void setFrom(String from)
Sets the email address to use for SMTP MAIL command

Email address to use for SMTP MAIL command. This sets the envelope return address. Defaults to msg.getFrom() or InternetAddress.getLocalAddress(). NOTE: mail.smtp.user was previously used for this.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
from - the email address to use for SMTP MAIL command

getLocalhost

public String getLocalhost()
Returns the local host name used in the SMTP HELO or EHLO command.


setLocalhost

public void setLocalhost(String localhost)
Sets the local host name used in the SMTP HELO or EHLO command.

Local host name used in the SMTP HELO or EHLO command. Defaults to InetAddress.getLocalHost().getHostName(). Should not normally need to be set if your JDK and your name service are configured properly.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
localhost - the local host name used in the SMTP HELO or EHLO command

getLocaladdress

public String getLocaladdress()
Returns the local address (host name) to bind to when creating the SMTP socket.


setLocaladdress

public void setLocaladdress(String localaddress)
Sets the local address (host name) to bind to when creating the SMTP socket.

Local address (host name) to bind to when creating the SMTP socket. Defaults to the address picked by the Socket class. Should not normally need to be set, but useful with multi-homed hosts where it's important to pick a particular local address to bind to.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
localaddress - the local address (host name) to bind to when creating the SMTP socket

getLocalport

public Integer getLocalport()
Returns the local port number to bind to when creating the SMTP socket.


setLocalport

public void setLocalport(Integer localport)
Sets the local port number to bind to when creating the SMTP socket.

Local port number to bind to when creating the SMTP socket. Defaults to the port number picked by the Socket class.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
localport - the local port number to bind to when creating the SMTP socket

getEhlo

public Boolean getEhlo()
Returns whether an attempt will be made to sign on with the EHLO command.

If false, do not attempt to sign on with the EHLO command. Normally failure of the EHLO command will fallback to the HELO command; this property exists only for servers that don't fail EHLO properly or don't implement EHLO properly.


setEhlo

public void setEhlo(Boolean ehlo)
Set whether an attempt will be made to sign on with the EHLO command.

If false, do not attempt to sign on with the EHLO command. Normally failure of the EHLO command will fallback to the HELO command; this property exists only for servers that don't fail EHLO properly or don't implement EHLO properly.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
ehlo - whether an attempt will be made to sign on with the EHLO command

getAuth

public Boolean getAuth()
Returns whether an attempt will be made to authenticate the user using the AUTH command.

Defaults to false.


setAuth

public void setAuth(Boolean auth)
Sets whether an attempt will be made to authenticate the user using the AUTH command.

Defaults to false.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
auth - whether an attempt will be made to authenticate the user using the AUTH command.

getStartTLSEnable

public Boolean getStartTLSEnable()
Returns the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the server's certificate. This feature only works on J2SE 1.4 and newer systems. Default is false.


setStartTLSEnable

public void setStartTLSEnable(Boolean startTLSEnable)
Sets the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands.

If true, enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands. Note that an appropriate trust store must configured so that the client will trust the server's certificate. This feature only works on J2SE 1.4 and newer systems. Default is false.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
startTLSEnable - the flag that enables the use of the STARTTLS command (if supported by the server) to switch the connection to a TLS-protected connection before issuing any login commands

getSubmitter

public String getSubmitter()
Returns the submitter to use in the AUTH tag in the MAIL FROM command.

Typically used by a mail relay to pass along information about the original submitter of the message. See also the setSubmitter method of SMTPMessage. Mail clients typically do not use this.


setSubmitter

public void setSubmitter(String submitter)
Sets the submitter to use in the AUTH tag in the MAIL FROM command.

Typically used by a mail relay to pass along information about the original submitter of the message. See also the setSubmitter method of SMTPMessage. Mail clients typically do not use this.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
submitter - the submitter to use in the AUTH tag in the MAIL FROM command

getDsnNotify

public String getDsnNotify()
Returns the NOTIFY option to the RCPT command.

Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY (separated by commas).


setDsnNotify

public void setDsnNotify(String dsnNotify)
Sets the NOTIFY option to the RCPT command

Either NEVER, or some combination of SUCCESS, FAILURE, and DELAY (separated by commas).

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
dsnNotify - the NOTIFY option to the RCPT command

getDsnRet

public String getDsnRet()
Returns the RET option to the MAIL command.

Either FULL or HDRS.


setDsnRet

public void setDsnRet(String dsnRet)
Sets the RET option to the MAIL command

Either FULL or HDRS.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
dsnRet - the RET option to the MAIL command

getAllow8bitmime

public Boolean getAllow8bitmime()
Returns whether encodings are converted to use "8bit" under certain conditions.

If set to true, and the server supports the 8BITMIME extension, text parts of messages that use the "quoted-printable" or "base64" encodings are converted to use "8bit" encoding if they follow the RFC2045 rules for 8bit text.


setAllow8bitmime

public void setAllow8bitmime(Boolean allow8bitmime)
Sets whether encodings are converted to use "8bit" under certain conditions.

If set to true, and the server supports the 8BITMIME extension, text parts of messages that use the "quoted-printable" or "base64" encodings are converted to use "8bit" encoding if they follow the RFC2045 rules for 8bit text.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
allow8bitmime - whether encodings are converted to use "8bit" under certain conditions

getSendPartial

public Boolean getSendPartial()
Returns whether to send email to valid addresses when others are invalid.

If set to true, and a message has some valid and some invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException. If set to false (the default), the message is not sent to any of the recipients if there is an invalid recipient address.


setSendPartial

public void setSendPartial(Boolean sendPartial)
Sets whether to send email to valid addresses when others are invalid.

If set to true, and a message has some valid and some invalid addresses, send the message anyway, reporting the partial failure with a SendFailedException. If set to false (the default), the message is not sent to any of the recipients if there is an invalid recipient address.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
sendPartial - whether to send email to valid addresses when others are invalid

getSaslRealm

public String getSaslRealm()
Returns the realm to use with DIGEST-MD5 authentication.


setSaslRealm

public void setSaslRealm(String saslRealm)
Sets the realm to use with DIGEST-MD5 authentication.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
saslRealm - the realm to use with DIGEST-MD5 authentication

getQuitWait

public Boolean getQuitWait()
Returns whether the transport will wait for the response to the QUIT command.

If set to true, causes the transport to wait for the response to the QUIT command. If set to false (the default), the QUIT command is sent and the connection is immediately closed.


setQuitWait

public void setQuitWait(Boolean quitWait)
Sets whether the transport will wait for the response to the QUIT command

If set to true, causes the transport to wait for the response to the QUIT command. If set to false (the default), the QUIT command is sent and the connection is immediately closed.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
quitWait - whether the transport will wait for the response to the QUIT command

getReportSuccess

public Boolean getReportSuccess()
Returns whether the transport will include an SMTPAddressSucceededException for each address that is successful.

Note also that this will cause a SendFailedException to be thrown from the sendMessage method of SMTPTransport even if all addresses were correct and the message was sent successfully.


setReportSuccess

public void setReportSuccess(Boolean reportSuccess)
Sets whether the transport will include an SMTPAddressSucceededException for each address that is successful.

Note also that this will cause a SendFailedException to be thrown from the sendMessage method of SMTPTransport even if all addresses were correct and the message was sent successfully.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
reportSuccess - whether the transport will include an SMTPAddressSucceededException for each address that is successful

getSocketFactoryClass

public String getSocketFactoryClass()
Returns the class that will be used to create SMTP sockets.

If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.


setSocketFactoryClass

public void setSocketFactoryClass(String socketFactoryClass)
Sets the class that will be used to create SMTP sockets.

If set, specifies the name of a class that implements the javax.net.SocketFactory interface. This class will be used to create SMTP sockets.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
socketFactoryClass - the class that will be used to create SMTP sockets

getSocketFactoryFallback

public Boolean getSocketFactoryFallback()
Returns whether java.net.Socket class will be created if the specified socket factory class cannot be created.

If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.


setSocketFactoryFallback

public void setSocketFactoryFallback(Boolean socketFactoryFallback)
Sets whether java.net.Socket class will be created if the specified socket factory class cannot be created.

If set to true, failure to create a socket using the specified socket factory class will cause the socket to be created using the java.net.Socket class. Defaults to true.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
socketFactoryFallback - whether java.net.Socket class will be created if the specified socket factory class cannot be created

getSocketFactoryPort

public Integer getSocketFactoryPort()
Returns the port to connect to when using the specified socket factory.

Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.


setSocketFactoryPort

public void setSocketFactoryPort(Integer socketFactoryPort)
Sets the port to connect to when using the specified socket factory.

Specifies the port to connect to when using the specified socket factory. If not set, the default port will be used.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
socketFactoryPort - the port to connect to when using the specified socket factory

getMailExtension

public String getMailExtension()
Returns the extension string to append to the MAIL command.

Extension string to append to the MAIL command. The extension string can be used to specify standard SMTP service extensions as well as vendor-specific extensions. Typically the application should use the SMTPTransport method supportsExtension to verify that the server supports the desired service extension. See RFC 1869 and other RFCs that define specific extensions.


setMailExtension

public void setMailExtension(String mailExtension)
Sets the extension string to append to the MAIL command.

Extension string to append to the MAIL command. The extension string can be used to specify standard SMTP service extensions as well as vendor-specific extensions. Typically the application should use the SMTPTransport method supportsExtension to verify that the server supports the desired service extension. See RFC 1869 and other RFCs that define specific extensions.

Values that are set here will override any of the corresponding value that has been set in the properties.

Parameters:
mailExtension - the extension string to append to the MAIL command

addOverrides

public void addOverrides(Properties props)
Add the overrides from the member variables to the properties file.

Overrides:
addOverrides in class ProtocolGBean

doStart

public void doStart()
             throws Exception
Specified by:
doStart in interface org.apache.geronimo.gbean.GBeanLifecycle
Overrides:
doStart in class ProtocolGBean
Throws:
Exception

doStop

public void doStop()
            throws Exception
Specified by:
doStop in interface org.apache.geronimo.gbean.GBeanLifecycle
Overrides:
doStop in class ProtocolGBean
Throws:
Exception

doFail

public void doFail()
Specified by:
doFail in interface org.apache.geronimo.gbean.GBeanLifecycle
Overrides:
doFail in class ProtocolGBean

getGBeanInfo

public static org.apache.geronimo.gbean.GBeanInfo getGBeanInfo()


Copyright © 2006 Apache Software Foundation. All Rights Reserved.