Package com.saperion.common.mail
Class MailConfiguration
- java.lang.Object
-
- com.saperion.common.mail.MailConfiguration
-
- All Implemented Interfaces:
java.lang.Cloneable
public class MailConfiguration extends java.lang.Object implements java.lang.CloneableConfiguration-object for the
Mailingclass.This implementation is not synchronized. If used by different threads concurrently, external synchronization is necessary.
- Author:
- sts
- See Also:
Mailing
-
-
Constructor Summary
Constructors Constructor Description MailConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MailConfigurationclone()java.lang.StringgetSmtpPassword()Returns the SMTP password.intgetSmtpPort()Returns the port of the SMTP server.java.lang.StringgetSmtpServer()Returns the SMTP Server URL or IP-address.java.lang.StringgetSmtpUser()Returns the SMTP user name.booleanisDebugEnabled()Indicates if SMTP debug should be enabled.booleanisSslEnabled()Indicates if SSL should be used.MailConfigurationsetDebugEnabled(boolean isDebugEnabled)Sets if SMTP debug enabled.MailConfigurationsetSmtpPassword(java.lang.String smtpPassword)Sets the SMTP password for SMTP authentication.MailConfigurationsetSmtpPort(int smtpPort)Sets the port of the SMTP server.MailConfigurationsetSmtpServer(java.lang.String smtpServer)Sets the SMTP server URL or IP-address.MailConfigurationsetSmtpUser(java.lang.String smtpUser)Sets the SMTP user name of SMTP authentication should be used.MailConfigurationsetSslEnabled(boolean isSslEnabled)Sets if SSL should be used.java.lang.StringtoString()
-
-
-
Method Detail
-
isDebugEnabled
public boolean isDebugEnabled()
Indicates if SMTP debug should be enabled.- Returns:
- true if SMTP debug should be enabled, false otherwise.
-
setDebugEnabled
public MailConfiguration setDebugEnabled(boolean isDebugEnabled)
Sets if SMTP debug enabled.- Parameters:
isDebugEnabled- enabled (true) or disabled (false).- Returns:
- this instance.
-
getSmtpServer
public java.lang.String getSmtpServer()
Returns the SMTP Server URL or IP-address.- Returns:
- the SMTP Server URL or IP-address
-
setSmtpServer
public MailConfiguration setSmtpServer(java.lang.String smtpServer)
Sets the SMTP server URL or IP-address.- Parameters:
smtpServer- URL or IP-address- Returns:
- this instance.
-
getSmtpUser
public java.lang.String getSmtpUser()
Returns the SMTP user name. May be null or empty, if no SMTP authentication should be used.- Returns:
- the SMTP user name
-
setSmtpUser
public MailConfiguration setSmtpUser(java.lang.String smtpUser)
Sets the SMTP user name of SMTP authentication should be used.- Parameters:
smtpUser- SMTP user name.- Returns:
- this instance.
-
getSmtpPassword
public java.lang.String getSmtpPassword()
Returns the SMTP password. May benullor empty, if no SMTP authentication should be used.- Returns:
- the SMTP password. May be
nullor empty, if no SMTP authentication should be used.
-
setSmtpPassword
public MailConfiguration setSmtpPassword(java.lang.String smtpPassword)
Sets the SMTP password for SMTP authentication.- Parameters:
smtpPassword- the password.- Returns:
- this instance.
-
getSmtpPort
public int getSmtpPort()
Returns the port of the SMTP server.- Returns:
- the port of the SMTP server
-
setSmtpPort
public MailConfiguration setSmtpPort(int smtpPort)
Sets the port of the SMTP server.- Parameters:
smtpPort- the port.- Returns:
- this instance.
-
isSslEnabled
public boolean isSslEnabled()
Indicates if SSL should be used.- Returns:
- true if SSL should be used, false otherwise.
-
setSslEnabled
public MailConfiguration setSslEnabled(boolean isSslEnabled)
Sets if SSL should be used.- Parameters:
isSslEnabled- true, SSL should be used, false otherwise.- Returns:
- this instance.
-
clone
public MailConfiguration clone()
- Overrides:
clonein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-