org.mule.providers.email
Class SmtpConnector

java.lang.Object
  extended by org.mule.providers.AbstractConnector
      extended by org.mule.providers.email.AbstractMailConnector
          extended by org.mule.providers.email.SmtpConnector
All Implemented Interfaces:
ExceptionListener, EventListener, javax.resource.spi.work.WorkListener, Disposable, Initialisable, UMOConnectable, UMOConnector
Direct Known Subclasses:
SmtpsConnector

public class SmtpConnector
extends AbstractMailConnector

SmtpConnector is used to connect to and send data to an SMTP mail server


Field Summary
static String DEFAULT_CONTENT_TYPE
           
static String DEFAULT_SMTP_HOST
           
static int DEFAULT_SMTP_PORT
           
 
Fields inherited from class org.mule.providers.email.AbstractMailConnector
MAILBOX
 
Fields inherited from class org.mule.providers.AbstractConnector
connected, connecting, connectionStrategy, createMultipleTransactedReceivers, DEFAULT_NUM_CONCURRENT_TX_RECEIVERS, defaultInboundTransformer, defaultOutboundTransformer, defaultResponseTransformer, dispatcherFactory, dispatchers, disposed, disposing, exceptionListener, initialised, logger, name, numberOfConcurrentTransactedReceivers, receivers, serviceDescriptor, serviceOverrides, sessionHandler, started, startOnConnect
 
Fields inherited from interface org.mule.umo.provider.UMOConnector
INT_VALUE_NOT_SET
 
Constructor Summary
SmtpConnector()
           
 
Method Summary
 UMOMessageReceiver createReceiver(UMOComponent component, UMOEndpoint endpoint)
          Create a Message receiver for this connector
protected  void doInitialise()
           
 String getBccAddresses()
           
 String getCcAddresses()
           
 String getContentType()
           
 Properties getCustomHeaders()
           
 int getDefaultPort()
           
 String getFromAddress()
           
 String getHost()
           
 String getPassword()
           
 int getPort()
           
 String getProtocol()
           
 String getReplyToAddresses()
           
 String getSubject()
           
 String getUsername()
           
 void setBccAddresses(String string)
           
 void setCcAddresses(String string)
           
 void setContentType(String contentType)
           
 void setCustomHeaders(Properties customHeaders)
           
 void setFromAddress(String string)
           
 void setHost(String host)
           
 void setPassword(String password)
           
 void setPort(int port)
           
 void setReplyToAddresses(String replyTo)
           
 void setSubject(String string)
           
 void setUsername(String username)
           
 
Methods inherited from class org.mule.providers.email.AbstractMailConnector
doConnect, doDisconnect, doDispose, doStart, doStop, dumpProperties, extendPropertiesForSession, getAuthenticator, getBaseProtocol, getMailboxFolder, getSessionDetails, newSession, setAuthenticator, setMailboxFolder, urlFromEndpoint
 
Methods inherited from class org.mule.providers.AbstractConnector
checkDisposed, connect, destroyReceiver, disconnect, dispatch, dispose, disposeDispatchers, disposeReceivers, disposeWorkManagers, exceptionThrown, fireNotification, getConnectEventId, getConnectionDescription, getConnectionStrategy, getDefaultInboundTransformer, getDefaultOutboundTransformer, getDefaultResponseTransformer, getDispatcherFactory, getDispatcherThreadingProfile, getDispatcherWorkManager, getExceptionListener, getMaxDispatchersActive, getMessageAdapter, getName, getNumberOfConcurrentTransactedReceivers, getOutputStream, getReceiver, getReceiverKey, getReceivers, getReceivers, getReceiverThreadingProfile, getReceiverWorkManager, getReplyToHandler, getScheduler, getServiceDescriptor, getServiceOverrides, getSessionHandler, getStreamMessageAdapter, getSupportedProtocols, handleException, handleWorkException, initFromServiceDescriptor, initialise, initialiseFromUrl, isConnected, isCreateMultipleTransactedReceivers, isDisposed, isDisposing, isEnableMessageEvents, isRemoteSyncEnabled, isStarted, lookupReceiver, receive, receive, registerListener, registerSupportedProtocol, registerSupportedProtocolWithoutPrefix, send, setConnectionStrategy, setCreateMultipleTransactedReceivers, setDefaultInboundTransformer, setDefaultOutboundTransformer, setDefaultResponseTransformer, setDispatcherFactory, setDispatcherThreadingProfile, setEnableMessageEvents, setExceptionListener, setMaxDispatchersActive, setName, setNumberOfConcurrentTransactedReceivers, setReceiverThreadingProfile, setServiceOverrides, setSessionHandler, setSupportedProtocols, startConnector, stopConnector, supportsProtocol, toString, unregisterListener, unregisterSupportedProtocol, workAccepted, workCompleted, workRejected, workStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_SMTP_HOST

public static final String DEFAULT_SMTP_HOST
See Also:
Constant Field Values

DEFAULT_SMTP_PORT

public static final int DEFAULT_SMTP_PORT
See Also:
Constant Field Values

DEFAULT_CONTENT_TYPE

public static final String DEFAULT_CONTENT_TYPE
See Also:
Constant Field Values
Constructor Detail

SmtpConnector

public SmtpConnector()
Method Detail

getProtocol

public String getProtocol()
Returns:
the primary protocol name for endpoints of this connector

doInitialise

protected void doInitialise()
                     throws InitialisationException
Overrides:
doInitialise in class AbstractMailConnector
Throws:
InitialisationException

createReceiver

public UMOMessageReceiver createReceiver(UMOComponent component,
                                         UMOEndpoint endpoint)
                                  throws Exception
Description copied from class: AbstractConnector
Create a Message receiver for this connector

Overrides:
createReceiver in class AbstractConnector
Parameters:
component - the component that will receive events from this receiver, the listener
endpoint - the endpoint that defies this inbound communication
Returns:
an instance of the message receiver defined in this connectors' TransportServiceDescriptor initialised using the component and endpoint.
Throws:
Exception - if there is a problem creating the receiver. This exception really depends on the underlying transport, thus any exception could be thrown

getFromAddress

public String getFromAddress()
Returns:
The default from address to use

getBccAddresses

public String getBccAddresses()
Returns:
the default comma separated list of BCC addresses to use

getCcAddresses

public String getCcAddresses()
Returns:
the default comma separated list of CC addresses to use

getSubject

public String getSubject()
Returns:
the default message subject to use

setBccAddresses

public void setBccAddresses(String string)

setCcAddresses

public void setCcAddresses(String string)

setSubject

public void setSubject(String string)

setFromAddress

public void setFromAddress(String string)

getReplyToAddresses

public String getReplyToAddresses()

setReplyToAddresses

public void setReplyToAddresses(String replyTo)

getCustomHeaders

public Properties getCustomHeaders()

setCustomHeaders

public void setCustomHeaders(Properties customHeaders)

getContentType

public String getContentType()

setContentType

public void setContentType(String contentType)

getDefaultPort

public int getDefaultPort()
Overrides:
getDefaultPort in class AbstractMailConnector

getHost

public String getHost()

setHost

public void setHost(String host)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getPort

public int getPort()

setPort

public void setPort(int port)

getUsername

public String getUsername()

setUsername

public void setUsername(String username)


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.