C# Class Argentini.Halide.H3EmailTemplate

The Halide.H3EmailTemplate class reads a specified file and performs find/replace actions on it. Note: You can also specify a web-style path to the file.
显示文件 Open project: argentini/Halide

Public Methods

Method Description
AddFindReplaceItem ( string find, string replace ) : void

Use this to store strings that you want to find and replace in the e-mail template.

ContainsItem ( string findAndReplaceItem ) : bool

Determine if the email ttemplate contains a given short code (something replaceable).

H3EmailTemplate ( string templatePath ) : System

Constructor accepts the path to a template file on disk.

PrepareAndSendMail ( string sender, string senderName, string recipient, string ccList, string bccList, string subject, Halide bodyFormat ) : string

Performs Find and Replace on the e-mail template file used in constructor, then sends the e-mail.

PrepareAndSendMail ( string sender, string senderName, string recipient, string ccList, string bccList, string subject, Halide bodyFormat, ArrayList attachments ) : string

Performs Find and Replace on the e-mail template file used in constructor, then sends the e-mail.

Private Methods

Method Description
FindAndReplace ( ) : void

Returns the e-mail template contents after finding and replacing values that were set using AddFindReplaceItem.

Method Details

AddFindReplaceItem() public method

Use this to store strings that you want to find and replace in the e-mail template.
public AddFindReplaceItem ( string find, string replace ) : void
find string
replace string
return void

ContainsItem() public method

Determine if the email ttemplate contains a given short code (something replaceable).
public ContainsItem ( string findAndReplaceItem ) : bool
findAndReplaceItem string String to search for.
return bool

H3EmailTemplate() public method

Constructor accepts the path to a template file on disk.
public H3EmailTemplate ( string templatePath ) : System
templatePath string
return System

PrepareAndSendMail() public method

Performs Find and Replace on the e-mail template file used in constructor, then sends the e-mail.
public PrepareAndSendMail ( string sender, string senderName, string recipient, string ccList, string bccList, string subject, Halide bodyFormat ) : string
sender string The e-mail address of the sender
senderName string The name of the sender
recipient string The e-mail of the recipient
ccList string List of recipients to get copied
bccList string List of recipients to get blind copied
subject string The subject of the msg
bodyFormat Halide MailFormat value for message body format.
return string

PrepareAndSendMail() public method

Performs Find and Replace on the e-mail template file used in constructor, then sends the e-mail.
public PrepareAndSendMail ( string sender, string senderName, string recipient, string ccList, string bccList, string subject, Halide bodyFormat, ArrayList attachments ) : string
sender string The e-mail address of the sender
senderName string The name of the sender
recipient string The e-mail of the recipient
ccList string List of recipients to get copied
bccList string List of recipients to get blind copied
subject string The subject of the msg
bodyFormat Halide MailFormat value for message body format.
attachments System.Collections.ArrayList Attachments to send with the email.
return string