Package com.consol.citrus.mail.client
Class MailEndpointConfiguration
- java.lang.Object
-
- com.consol.citrus.endpoint.AbstractEndpointConfiguration
-
- com.consol.citrus.mail.client.MailEndpointConfiguration
-
- All Implemented Interfaces:
EndpointConfiguration
public class MailEndpointConfiguration extends AbstractEndpointConfiguration
- Since:
- 1.4
- Author:
- Christoph Deppisch
-
-
Constructor Summary
Constructors Constructor Description MailEndpointConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetHost()Gets the mail host.PropertiesgetJavaMailProperties()Gets the mail properties.org.springframework.mail.javamail.JavaMailSenderImplgetJavaMailSender()Gets the Java mail sender implementation.MailMarshallergetMarshaller()Gets the mail message marshaller implementation.MailMessageConvertergetMessageConverter()Gets the mail message converter.StringgetPassword()Gets the mail password.intgetPort()Gets the mail port.StringgetProtocol()Gets the mail protocol.StringgetUsername()Gets the mail username.voidsetHost(String host)Set the mail server host, typically an SMTP host.voidsetJavaMailProperties(Properties javaMailProperties)Set JavaMail properties for the mail session such as"mail.smtp.auth"when using username and password.voidsetJavaMailSender(org.springframework.mail.javamail.JavaMailSenderImpl javaMailSender)Sets the Java mail sender implementation.voidsetMarshaller(MailMarshaller marshaller)Sets the mail message marshaller implementation.voidsetMessageConverter(MailMessageConverter messageConverter)Sets the mail message converter.voidsetPassword(String password)Set the password for accessing the mail host.voidsetPort(int port)Set the mail server port.voidsetProtocol(String protocol)Set the mail protocol.voidsetUsername(String username)Set the username for accessing the mail host.-
Methods inherited from class com.consol.citrus.endpoint.AbstractEndpointConfiguration
getTimeout, setTimeout
-
-
-
-
Method Detail
-
getProtocol
public String getProtocol()
Gets the mail protocol.- Returns:
- the mail protocol.
-
setProtocol
public void setProtocol(String protocol)
Set the mail protocol. Default is "smtp".- Parameters:
protocol-
-
getHost
public String getHost()
Gets the mail host.- Returns:
- the mail host.
-
setHost
public void setHost(String host)
Set the mail server host, typically an SMTP host.- Parameters:
host-
-
getPort
public int getPort()
Gets the mail port.- Returns:
- the mail port.
-
setPort
public void setPort(int port)
Set the mail server port. Default is the Java mail port for SMTP (25).- Parameters:
port-
-
getUsername
public String getUsername()
Gets the mail username.- Returns:
- the mail username.
-
setUsername
public void setUsername(String username)
Set the username for accessing the mail host. Underlying mail seesion has to be configured with the property"mail.smtp.auth"set totrue.- Parameters:
username-
-
getPassword
public String getPassword()
Gets the mail password.- Returns:
- the mail ppassword.
-
setPassword
public void setPassword(String password)
Set the password for accessing the mail host. Underlying mail seesion has to be configured with the property"mail.smtp.auth"set totrue.- Parameters:
password-
-
getJavaMailProperties
public Properties getJavaMailProperties()
Gets the mail properties.- Returns:
- the mail properties.
-
setJavaMailProperties
public void setJavaMailProperties(Properties javaMailProperties)
Set JavaMail properties for the mail session such as"mail.smtp.auth"when using username and password. New session is created when properties are set.- Parameters:
javaMailProperties-
-
getMarshaller
public MailMarshaller getMarshaller()
Gets the mail message marshaller implementation.- Returns:
-
setMarshaller
public void setMarshaller(MailMarshaller marshaller)
Sets the mail message marshaller implementation.- Parameters:
marshaller-
-
getJavaMailSender
public org.springframework.mail.javamail.JavaMailSenderImpl getJavaMailSender()
Gets the Java mail sender implementation.- Returns:
-
setJavaMailSender
public void setJavaMailSender(org.springframework.mail.javamail.JavaMailSenderImpl javaMailSender)
Sets the Java mail sender implementation.- Parameters:
javaMailSender-
-
getMessageConverter
public MailMessageConverter getMessageConverter()
Gets the mail message converter.- Returns:
-
setMessageConverter
public void setMessageConverter(MailMessageConverter messageConverter)
Sets the mail message converter.- Parameters:
messageConverter-
-
-