Package org.citrusframework.mail.client
Class MailEndpointConfiguration
java.lang.Object
org.citrusframework.endpoint.AbstractEndpointConfiguration
org.citrusframework.mail.client.MailEndpointConfiguration
- All Implemented Interfaces:
EndpointConfiguration
- Since:
- 1.4
- Author:
- Christoph Deppisch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionjakarta.mail.AuthenticatorGets the authenticator.getHost()Gets the mail host.Gets the mail properties.Gets the mail message marshaller implementation.Gets the mail message converter.Gets the mail password.intgetPort()Gets the mail port.Gets the mail protocol.Gets the mail username.voidsetAuthenticator(jakarta.mail.Authenticator authenticator) Sets the authenticator.voidSet 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.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 mailing protocol.voidsetUsername(String username) Set the username for accessing the mail host.Methods inherited from class org.citrusframework.endpoint.AbstractEndpointConfiguration
getTimeout, setTimeout
-
Constructor Details
-
MailEndpointConfiguration
public MailEndpointConfiguration()
-
-
Method Details
-
getHost
Gets the mail host.- Returns:
- the mail host.
-
setHost
Set the mail server host, typically an SMTP host.- Parameters:
host- the mail server 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- the mail server port.
-
getUsername
Gets the mail username.- Returns:
- the mail username.
-
setUsername
Set the username for accessing the mail host. The underlying mail session has to be configured with the property"mail.smtp.auth"set totrue.- Parameters:
username- the username for accessing the mail host.
-
getPassword
Gets the mail password.- Returns:
- the mail password.
-
setPassword
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- the password for accessing the mail host.
-
getAuthenticator
public jakarta.mail.Authenticator getAuthenticator()Gets the authenticator.- Returns:
- The authenticator.
-
setAuthenticator
public void setAuthenticator(jakarta.mail.Authenticator authenticator) Sets the authenticator.- Parameters:
authenticator- the authenticator.
-
getProtocol
Gets the mail protocol.- Returns:
- the mail protocol.
-
setProtocol
Set the mailing protocol. Default is "smtp".- Parameters:
protocol- the mailing protocol.
-
getJavaMailProperties
Gets the mail properties.- Returns:
- the mail properties.
-
setJavaMailProperties
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- all mailing properties.
-
getMarshaller
Gets the mail message marshaller implementation.- Returns:
- the mail message marshaller.
-
setMarshaller
Sets the mail message marshaller implementation.- Parameters:
marshaller- the mail message marshaller.
-
getMessageConverter
Gets the mail message converter.- Returns:
- the mail message converter.
-
setMessageConverter
Sets the mail message converter.- Parameters:
messageConverter- the mail message converter.
-