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.Cloneable
Configuration-object for the
Mailing
class.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 MailConfiguration
clone()
java.lang.String
getSmtpPassword()
Returns the SMTP password.int
getSmtpPort()
Returns the port of the SMTP server.java.lang.String
getSmtpServer()
Returns the SMTP Server URL or IP-address.java.lang.String
getSmtpUser()
Returns the SMTP user name.boolean
isDebugEnabled()
Indicates if SMTP debug should be enabled.boolean
isSslEnabled()
Indicates if SSL should be used.MailConfiguration
setDebugEnabled(boolean isDebugEnabled)
Sets if SMTP debug enabled.MailConfiguration
setSmtpPassword(java.lang.String smtpPassword)
Sets the SMTP password for SMTP authentication.MailConfiguration
setSmtpPort(int smtpPort)
Sets the port of the SMTP server.MailConfiguration
setSmtpServer(java.lang.String smtpServer)
Sets the SMTP server URL or IP-address.MailConfiguration
setSmtpUser(java.lang.String smtpUser)
Sets the SMTP user name of SMTP authentication should be used.MailConfiguration
setSslEnabled(boolean isSslEnabled)
Sets if SSL should be used.java.lang.String
toString()
-
-
-
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 benull
or empty, if no SMTP authentication should be used.- Returns:
- the SMTP password. May be
null
or 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:
clone
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-