<< Click to Display Table of Contents >>

Mail

This class provides methods related to the email sending function of OZ Server.


Constructor Detail

Mail

public Mail(String url, String id, String pw, boolean bAutoLogin, boolean useUSL)

Performs email sending function

Parameters:

url - URL of OZ Server

id - User ID

pw - User Password

bAutoLogin - Whether to use the AutoLogin

useUSL - Whether to use the USL


Method Detail

addAlias

public void addAlias(String aliasName, SortProperties p) throws OZCPException

Adds mail configuration information with the alias configured in the OZ Server.

Parameters:

aliasName - The alias

p - The email configuration property value(refer to SortProperties)

getAliasConfig

public SortProperties getAliasConfig(String aliasName) throws OZCPException

Gets the mail configuration information of the corresponding alias.

Parameters:

aliasName - The alias

getMailAliasNames

public String[] getMailAliasNames()

Gets all mail aliases configured in the amil.properties in the OZ Server.

modifyAlias

public void modifyAlias(String aliasName, String newAliasName, SortProperties p) throws OZCPException

Modifies the name and mail configuration information of the corresponding alias.

Parameters:

aliasName - The alias

newAliasName - The new alias

p - Mail configuration property value

removeAlias

public void removeAlias(String aliasName) throws OZCPException

Deletes the mail configuration information of the corresponding alias.

Parameters:

aliasName - The alias

send

public void send(String aliasName, String from, String fromUserName, String to, String cc, String bcc, String subject, String context, boolean isHTML, String localFileFullPath, String fileName) throws OZCPException

Sends asynchronous mail according to the mail information of the corresponding alias.

Parameters:

aliasName - The alias

from - The email address of a person who sent the email

fromUserName - The name who sent the email

to - The email address of a person to receive the email

cc - The cc email address

bcc - The bcc email address

subject - The email subject

context - The email content

isHTML - Whether to set the message format to HTML

localFileFullPath - The full path of the file for attachment

fileName - The attached file name

sendSync

public boolean sendSync(String aliasName, String from, String fromUserName, String to, String cc, String bcc, String subject, String context, boolean isHTML, String localFileFullPath, String fileName) throws OZCPException

Sends synchronous mail according to the mail information of the corresponding alias, and gets whether the transmission succeeded.

Parameters:

aliasName - The alias

from - The email address of a person who sent the email

fromUserName - The name who sent the email

to - The email address of a person to receive the email

cc - The cc email address

bcc - The bcc email address

subject - The email subject

context - The email content

isHTML - Whether to set the message format to HTML

localFileFullPath - The full path of the file for attachment

fileName - The attached file name