public class MailConfig
extends java.lang.Object
Mail server host
. The host name of
the machine where the mail server runs. Mail will be sent to this server.
Mail server port
. The port of the mail
server given above.
Secure connection
. If true
then
use SMTPS (i.e. SMTP over TLS/SSL), otherwise plain, unprotected SMTP.
If not specified, it defaults to false
and plain SMTP will be used.
Skip server
certificate validation
. If set to true
when using an SMTPS
connection, the mail server certificate is not checked for validity.
Ideally this setting should never be used (security loophole!) but it may be
your only option with a self-signed server certificate which you cannot add
to the Java key store. This setting defaults to false
if not
specified and will be in any case ignored for an SMTP connection.
Username
. The username to log into the
mail server, if required. Leave blank if not needed.
Password
. The password to log into the
mail server, if required. Leave blank if not needed.
From address
. The "from"
address of each and every mail we send.
Retry intervals
.
How many times and at which intervals to retry a failed mail relay.
If a relay fails, it will be retried after the number of minutes given in
the first slot of this array; if the retry fails, it will be attempted again
after the number of minutes given in the second slot of this array; and so
on until the relay succeeds or the last slot is used. So a failed relay
will be retried at most a number of times equal to the length of this array;
if the array is null
or empty, no retries will ever be attempted.
Dead mail directory
.
Path to the directory where to store email messages that could not be
relayed to the mail server, that is, messages whose delivery failed past
the configured number of retries as explained above.
A message in the dead mail directory will be kept indefinitely, the system
administrator will have to explicitly delete it after re-sending it to the
intended recipient, for example by inputting the file into a program such
as sendmail
.
Note that directories in the given path will be created if needed.
System administrator's email
.
Optional email address of the system administrator. If specified, every time
an import fails permanently an alert email is sent to this address.
Constructor and Description |
---|
MailConfig() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object other) |
java.lang.String |
getDeadMailDir() |
java.lang.String |
getFromAddress() |
java.lang.String |
getMailServerHost() |
int |
getMailServerPort() |
java.lang.String |
getPassword() |
java.lang.Long[] |
getRetryIntervals() |
boolean |
getSkipServerCertificateValidation() |
java.lang.String |
getSysAdminEmail() |
java.lang.String |
getUsername() |
boolean |
getUseSmtps() |
int |
hashCode() |
void |
setDeadMailDir(java.lang.String failedRelayDir) |
void |
setFromAddress(java.lang.String fromAddress) |
void |
setMailServerHost(java.lang.String host) |
void |
setMailServerPort(int port) |
void |
setPassword(java.lang.String password) |
void |
setRetryIntervals(java.lang.Long[] retryIntervals) |
void |
setSkipServerCertificateValidation(boolean skipServerCertificateValidation) |
void |
setSysAdminEmail(java.lang.String sysAdminEmail) |
void |
setUsername(java.lang.String username) |
void |
setUseSmtps(boolean useSmtps) |
java.lang.String |
toString() |
public java.lang.String getMailServerHost()
public void setMailServerHost(java.lang.String host)
public int getMailServerPort()
public void setMailServerPort(int port)
public boolean getUseSmtps()
public void setUseSmtps(boolean useSmtps)
public boolean getSkipServerCertificateValidation()
public void setSkipServerCertificateValidation(boolean skipServerCertificateValidation)
public java.lang.String getUsername()
public void setUsername(java.lang.String username)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getFromAddress()
public void setFromAddress(java.lang.String fromAddress)
public java.lang.Long[] getRetryIntervals()
public void setRetryIntervals(java.lang.Long[] retryIntervals)
public java.lang.String getDeadMailDir()
public void setDeadMailDir(java.lang.String failedRelayDir)
public java.lang.String getSysAdminEmail()
public void setSysAdminEmail(java.lang.String sysAdminEmail)
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object