<< 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, bool autoLogin, bool useUSL)

Performs email sending function.

Parameters:

url - URL of OZ Server

id - User ID

pw - User Password

autoLogin - Whether to use the AutoLogin

useUSL - Whether to use the USL


Method Detail

AddAlias

public void AddAlias(string aliasName, NameValueCollection configMap)

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

Parameters:

aliasName - The alias

configMap - The email configuration property value

GetAliasConfig

public NameValueCollection GetAliasConfig(string aliasName)

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, NameValueCollection configMap)

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

Parameters:

aliasName - The alias

newAliasName - The new alias

configMap - Mail configuration property value

RemoveAlias

public void RemoveAlias(string aliasName)

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, bool isHTML, string localFileFullPath, string fileName)

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 bool SendSync(string aliasName, string from, string fromUserName, string to, string cc, string bcc, string subject, string context, bool isHTML, string localFileFullPath, string fileName)

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