public interface ConfigurationMail
ConfigurationMail
interface provides the methods to configure the mail settings on JReport Server, including the mail
sending related functions on JReport server, such as scheduling task of publishing to mail, and sending notification mail, etc.Modifier and Type | Field and Description |
---|---|
static int |
SPLIT_BY_PAGE
SPLIT_BY_SIZE split PDF by page (1).
|
static int |
SPLIT_BY_SIZE
SPLIT_BY_SIZE split PDF by size (0).
|
static java.lang.String |
TAG_AUTHENTICATION
TAG_AUTHENTICATION tag to indicate whether the SMTP Server requires authentication ("smtp.authentication").
|
static java.lang.String |
TAG_AUTHENTICATION_NEOPASSWORD
TAG_AUTHENTICATION_NEOPASSWORD tag to indicate login password when SMTP server requires authentication ("smtp.npassword")
|
static java.lang.String |
TAG_AUTHENTICATION_PASSWORD
TAG_AUTHENTICATION_PASSWORD tag to indicate login password when SMTP server requires authentication ("smtp.password")
|
static java.lang.String |
TAG_AUTHENTICATION_USER
TAG_AUTHENTICATION_USER tag to indicate login user when SMTP server requires authentication ("smtp.user")
|
static java.lang.String |
TAG_COMPRESS
TAG_COMPRESS tag to indicate whether or not to compress the mail attachment as Java Archive ("compress.mail").
|
static java.lang.String |
TAG_DEFAULT_FORMAT
TAG_DEFAULT_FORMAT tag to indicate the default format of the e-mail ("default.format").
|
static java.lang.String |
TAG_MAIL_ENCODING
TAG_MAIL_ENCODING tag to indicate the encoding for notification E-mail title and comments ("mail.encoding")
|
static java.lang.String |
TAG_MAILBOX
TAG_MAILBOX tag to indicate the address of the e-mail sender, for the e-mail sent by JReport Server ("mailbox").
|
static java.lang.String |
TAG_MAXMAILPage
TAG_MAXMAILPage tag to indicate the maximum split page of the PDF attachment ("Tag_MaxMailPage"), which will take effect when the value of
TAG_SPLITBY is SPLIT_BY_PAGE . |
static java.lang.String |
TAG_MAXMAILSIZE
TAG_MAXMAILSIZE tag to indicate the maximum split size of the PDF attachment ("Tag_MaxMailSize"), which will take effect when the value of
TAG_SPLITBY is SPLIT_BY_SIZE . |
static java.lang.String |
TAG_SMTP_PORT
TAG_SMTP_PORT tag to indicate the port where the e-mail server runs ("smtp.server.port").
|
static java.lang.String |
TAG_SMTP_SERVER
TAG_SMTP_SERVER tag to indicate the numeric or named host of the machine where the e-mail server is located ("smtp.server").
|
static java.lang.String |
TAG_SPLITBY
TAG_SPLITBY tag to indicate whether to split PDF attachment by size or by page ("Tag_SplitBy").
|
static java.lang.String |
TAG_SSL
TAG_AUTHENTICATION tag to indicate whether the SMTP Server requires secure connection(SSL) ("smtp.SSL").
|
static java.lang.String |
TAG_TLS
TAG_AUTHENTICATION tag to indicate whether the SMTP Server requires secure connection(TLS) ("smtp.TLS").
|
Modifier and Type | Method and Description |
---|---|
boolean |
getAuthentication()
Checks if SMTP server requires authentication for sending mails.
|
java.lang.String |
getAuthenticationPassword()
Get login password, which is used when
getAuthentication() return true |
java.lang.String |
getAuthenticationUser()
Get login user name, which is used when
getAuthentication() return true |
int |
getDefaultMailFormat()
Gets the format of the mail send out for scheduling of publishing to E-mail.
|
boolean |
getEnableCompress()
Checks whether to compress the mail attachment.
|
java.lang.String |
getEncoding()
Get the encoding for notification E-mail title and comments
|
java.lang.String |
getMailBox()
Returns the address of the mail sender, for the mails sent by JReport Server.
|
java.util.Vector |
getMailFormats()
Gets description of all the mail formats.
|
int |
getMailPort()
Returns the port of the SMTP mail server.
|
java.lang.String |
getMailServer()
Returns the name of the SMTP mail server.
|
int |
getMaxMailPage()
Gets the maximum page of the mail attachment in PDF format.
|
int |
getMaxMailSize()
Gets the maximum size of the mail attachment in PDF format.
|
int |
getSplitBy()
Gets the setting of splitting PDF attachment.
|
boolean |
getSSL()
Checks if SMTP server requires SSL for sending mails.
|
boolean |
getTLS()
Checks if SMTP server requires TLS for sending mails.
|
void |
setAuthentication(boolean isEnable)
Sets if the SMTP server requires authentication for sending mails.
|
void |
setAuthenticationPassword(java.lang.String pqssword)
Set login password, which is used when
getAuthentication() return true |
void |
setAuthenticationUser(java.lang.String username)
Set login user name, which is used when
getAuthentication() return true |
void |
setEnableCompress(boolean isEnable)
Sets whether to compress the mail attachment.
|
void |
setEncoding(java.lang.String encoding)
Set the encoding for notification E-mail title and comments
|
void |
setMailBox(java.lang.String mailBox)
Sets the address of the mail sender, for the mails sent by JReport Server.
|
void |
setMailFormat(int mailFormat)
Sets the default format of the mail send out for scheduling of publishing to E-mail.
|
void |
setMailPort(int port)
Sets the port of the SMTP mail server.
|
void |
setMailServer(java.lang.String smtpServerName)
Sets the name of the SMTP mail server.
|
void |
setMaxMailPage(int page)
Sets the maximum page of the mail attachment in PDF format.
|
void |
setMaxMailSize(int size)
Sets the maximum size of the mail attachment in PDF format.
|
void |
setSplitBy(int split)
Sets whether to split PDF attachment by size or by page.
|
void |
setSSL(boolean isEnable)
Sets if the SMTP server requires SSL for sending mails.
|
void |
setTLS(boolean isEnable)
Sets if the SMTP server requires TLS for sending mails.
|
static final java.lang.String TAG_SMTP_SERVER
static final java.lang.String TAG_SMTP_PORT
static final java.lang.String TAG_AUTHENTICATION
static final java.lang.String TAG_AUTHENTICATION_USER
static final java.lang.String TAG_AUTHENTICATION_PASSWORD
static final java.lang.String TAG_AUTHENTICATION_NEOPASSWORD
static final java.lang.String TAG_MAIL_ENCODING
static final java.lang.String TAG_SSL
static final java.lang.String TAG_TLS
static final java.lang.String TAG_MAILBOX
static final java.lang.String TAG_DEFAULT_FORMAT
static final java.lang.String TAG_COMPRESS
static final java.lang.String TAG_MAXMAILSIZE
TAG_SPLITBY
is SPLIT_BY_SIZE
.static final java.lang.String TAG_MAXMAILPage
TAG_SPLITBY
is SPLIT_BY_PAGE
.static final java.lang.String TAG_SPLITBY
static final int SPLIT_BY_SIZE
static final int SPLIT_BY_PAGE
void setMailServer(java.lang.String smtpServerName)
smtpServerName
- the name of the SMTP mail server.java.lang.String getMailServer()
void setMailPort(int port)
port
- the port of the SMTP mail server.int getMailPort()
void setMailBox(java.lang.String mailBox)
mailBox
- the address of the mail sender.java.lang.String getMailBox()
void setMailFormat(int mailFormat)
mailFormat
- the format of the mail send out, the available values are:
0: E-mail Result in HTML E-mail Format, 1: E-mail Result in Plain Text E-mail Format,
2: Attachment in JReport Result Format, 3: Attachment in HTML Format,
4: Attachment in PDF Format, 5: Attachment in Excel Format, 6: Attachment in Text Format,
7: Attachment in RTF Format, 8: Attachment in XML Format, 9: Attachment in PostScript Format.int getDefaultMailFormat()
java.util.Vector getMailFormats()
void setEnableCompress(boolean isEnable)
isEnable
- if true, the mail will be compressed; if false, will not be.boolean getEnableCompress()
void setMaxMailSize(int size)
setSplitBy()
is invoked and parameter value is SPLIT_BY_SIZE
.size
- the maximum size of the mail attachment in PDF format.int getMaxMailSize()
void setMaxMailPage(int page)
setSplitBy()
is invoked and parameter value is SPLIT_BY_PAGE
.page
- the maximum page of the mail attachment in PDF format.int getMaxMailPage()
void setSplitBy(int split)
split
- indicates whether to split PDF by size or by page.
SPLIT_BY_SIZE(0)
means to split by size,
SPLIT_BY_PAGE(1)
means to split by page.int getSplitBy()
SPLIT_BY_SIZE(0)
means to split by size,
SPLIT_BY_PAGE(1)
means to split by page.void setAuthentication(boolean isEnable)
isEnable
- if the SMTP server requires authentication for sending mails.boolean getAuthentication()
void setSSL(boolean isEnable)
isEnable
- if the SMTP server requires SSL for sending mails.boolean getSSL()
boolean getTLS()
void setTLS(boolean isEnable)
isEnable
- if the SMTP server requires TLS for sending mails.java.lang.String getEncoding()
void setEncoding(java.lang.String encoding)
encoding
- encoding that want to setjava.lang.String getAuthenticationUser()
getAuthentication()
return truevoid setAuthenticationUser(java.lang.String username)
getAuthentication()
return trueusername
- login user name.java.lang.String getAuthenticationPassword()
getAuthentication()
return truevoid setAuthenticationPassword(java.lang.String pqssword)
getAuthentication()
return truepqssword
- login password