Class MailEndpointConfiguration

java.lang.Object
org.citrusframework.endpoint.AbstractEndpointConfiguration
org.citrusframework.mail.client.MailEndpointConfiguration
All Implemented Interfaces:
EndpointConfiguration

public class MailEndpointConfiguration extends AbstractEndpointConfiguration
Since:
1.4
Author:
Christoph Deppisch
  • Constructor Details

    • MailEndpointConfiguration

      public MailEndpointConfiguration()
  • Method Details

    • 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 - 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

      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. The underlying mail session has to be configured with the property "mail.smtp.auth" set to true.
      Parameters:
      username - the username for accessing the mail host.
    • getPassword

      public String getPassword()
      Gets the mail password.
      Returns:
      the mail password.
    • 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 to true.
      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

      public String getProtocol()
      Gets the mail protocol.
      Returns:
      the mail protocol.
    • setProtocol

      public void setProtocol(String protocol)
      Set the mailing protocol. Default is "smtp".
      Parameters:
      protocol - the mailing protocol.
    • 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 - all mailing properties.
    • getMarshaller

      public MailMarshaller getMarshaller()
      Gets the mail message marshaller implementation.
      Returns:
      the mail message marshaller.
    • setMarshaller

      public void setMarshaller(MailMarshaller marshaller)
      Sets the mail message marshaller implementation.
      Parameters:
      marshaller - the mail message marshaller.
    • getMessageConverter

      public MailMessageConverter getMessageConverter()
      Gets the mail message converter.
      Returns:
      the mail message converter.
    • setMessageConverter

      public void setMessageConverter(MailMessageConverter messageConverter)
      Sets the mail message converter.
      Parameters:
      messageConverter - the mail message converter.