public class MailSenderEndpoint extends ProviderEndpoint implements MailEndpointType
definition, description, endpoint, interfaceName, service, serviceUnit| Constructor and Description |
|---|
MailSenderEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getConnection() |
java.util.Map<java.lang.String,java.lang.String> |
getCustomProperties() |
java.lang.String |
getCustomTrustManagers() |
IgnoreList |
getIgnoreMessageProperties() |
AbstractMailMarshaler |
getMarshaler() |
java.lang.String |
getReceiver() |
java.lang.String |
getSender() |
boolean |
isDebugMode() |
protected void |
processInOnly(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in) |
protected void |
processInOut(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
javax.jbi.messaging.NormalizedMessage out) |
void |
setConnection(java.lang.String connection)
Specifies the connection URI used to connect to a mail server.
|
void |
setCustomProperties(java.util.Map<java.lang.String,java.lang.String> customProperties)
Specifies a
java.util.Map which may contain additional
properties for the connection. |
void |
setCustomTrustManagers(java.lang.String customTrustManagers)
Specifies one or more trust manager classes separated by a semicolon (;).
These classes have to implement the Trustmanager interface and need to provide
an empty default constructor to be valid.If you want to accept all security certificates without a check you may consider using the DummyTrustManager class. |
void |
setDebugMode(boolean debugMode)
Specifies if the JavaMail is run in
DEBUG mode. |
void |
setIgnoreMessageProperties(IgnoreList ignoreMessageProperties)
Specifies a
java.util.List which may contain message
properties to skip. |
void |
setMarshaler(AbstractMailMarshaler marshaler)
With this method you can specify a marshaler class which provides the
logic for converting a normalized message into a mail.
|
void |
setReceiver(java.lang.String receiver)
Specifies the receiver address(es) of the mail which is being sent.
|
void |
setSender(java.lang.String sender)
Specifies the sender address of the mail which is being sent.
|
void |
validate() |
activate, deactivate, getRole, processdone, fail, getChannel, getContext, getExchangeFactory, send, sendSync, start, stopgetDefinition, getDescription, getEndpoint, getInterfaceName, getKey, getService, getServiceUnit, isExchangeOkay, prepareExchange, setDefinition, setDescription, setEndpoint, setInterfaceName, setService, setServiceUnit, toStringpublic void validate()
throws javax.jbi.management.DeploymentException
validate in interface Endpointvalidate in class AbstractEndpointjavax.jbi.management.DeploymentExceptionprotected void processInOnly(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in)
throws java.lang.Exception
processInOnly in class ProviderEndpointjava.lang.Exceptionprotected void processInOut(javax.jbi.messaging.MessageExchange exchange,
javax.jbi.messaging.NormalizedMessage in,
javax.jbi.messaging.NormalizedMessage out)
throws java.lang.Exception
processInOut in class ProviderEndpointjava.lang.Exceptionpublic AbstractMailMarshaler getMarshaler()
public void setMarshaler(AbstractMailMarshaler marshaler)
With this method you can specify a marshaler class which provides the
logic for converting a normalized message into a mail. This class has
to extend the abstract class AbstractMailMarshaler or an
extending class. If you don't specify a marshaler, the
DefaultMailMarshaler will be used.
marshaler - a class which extends AbstractMailMarshalerpublic java.lang.String getSender()
public void setSender(java.lang.String sender)
Specifies the sender address of the mail which is being sent.
The default value is no-reply@localhostsender - a String value containing the sender addresspublic java.lang.String getConnection()
public void setConnection(java.lang.String connection)
Specifies the connection URI used to connect to a mail server.
Templates:
<protocol>://<user>@<host>[:<port>][/<folder>]?password=<password>
OR
<protocol>://<host>[:<port>][/<folder>]?user=<user>;password=<password>
Details:
| Name | Description |
| protocol | the protocol to use (example: pop3 or imap) |
| user | the user name used to log into an account |
| host | the name or ip address of the mail server |
| port | the port number to use (optional) |
| folder | the folder to poll from (optional) |
| password | the password for the login |
connection - a String value containing the connection detailspublic boolean isDebugMode()
public void setDebugMode(boolean debugMode)
Specifies if the JavaMail is run in DEBUG mode. This means
that while connecting to server and processing mails a detailed log
is written to debug output.
This mode is very handy if you are experiencing problems with your
mail server connection and you want to find out what is going wrong
in communication with the server.
true - the debug mode is enabled
false - the debug mode is disabled
debugMode - a boolean value for debug modepublic java.lang.String getCustomTrustManagers()
public void setCustomTrustManagers(java.lang.String customTrustManagers)
Specifies one or more trust manager classes separated by a semicolon (;).
These classes have to implement the Trustmanager interface and need to provide
an empty default constructor to be valid.
If you want to accept all security certificates without a check you may
consider using the DummyTrustManager class. It is actually only
an empty stub without any checking logic.
But be aware that this will be
a security risk in production environments.
customTrustManagers - a String value containing one or more full class names separated by ; charpublic java.lang.String getReceiver()
public void setReceiver(java.lang.String receiver)
Specifies the receiver address(es) of the mail which is being sent.
The default value is nullreceiver - a String value containing the receiver address(es)public java.util.Map<java.lang.String,java.lang.String> getCustomProperties()
public void setCustomProperties(java.util.Map<java.lang.String,java.lang.String> customProperties)
Specifies a java.util.Map which may contain additional
properties for the connection.
Example for disabling TOP for POP3 headers:
key: "mail.pop3.disabletop"
value: "true"
customProperties - a java.util.Map<String, String> containing connection propertiespublic IgnoreList getIgnoreMessageProperties()
public void setIgnoreMessageProperties(IgnoreList ignoreMessageProperties)
Specifies a java.util.List which may contain message
properties to skip.
Example for skipping all kind of addresses from the normalized message:
value: "org.apache.servicemix.mail.to"
value: "org.apache.servicemix.mail.cc"
value: "org.apache.servicemix.mail.bcc"
value: "org.apache.servicemix.mail.from"
value: "org.apache.servicemix.mail.replyto"
ignoreMessageProperties - a list containing keys of properties to ignoreIgnoreListCopyright © 2005-2014 FuseSource. All Rights Reserved.