C# Class Argentini.Halide.H3Email

The Halide E-mail class provides a set of methods for sending and manipulating e-mail.
Show file Open project: argentini/Halide

Public Methods

Method Description
BuildHtmlEmail ( Control containerControl ) : String

Build an HTML e-mail body from a container's form field objects.

Works with the following controls: TextBox, RadioButtonList, CheckBoxList, DropDownList, ListBox, HiddenField. Checkboxlists return comma-separated lists of values.

using Argentini.Halide; ... string emailBody = H3Email.BuildHtmlEmail("ContainerDiv1"); string result = H3Email.Send( "[email protected]", "[email protected],[email protected]", "Message subject here", emailBody, H3Email.MailFormat.Html);

BuildPlainTextEmail ( Control containerControl ) : String

Build a plain text e-mail body from a container's form field objects.

Works with the following controls: TextBox, RadioButtonList, CheckBoxList, DropDownList, ListBox, HiddenField. Checkboxlists return comma-separated lists of values.

Send ( String senderAddress, String senderName, String recipient, String ccList, String bccList, String subject, String body, MailFormat bodyFormat, ArrayList attachments, ArrayList attachmentNames, System.Boolean useSsl ) : String

Send an e-mail message with optional attachments.

Send ( string sender, string recipient, string subject, string body, MailFormat bodyFormat ) : String

Send an e-mail message.

Send ( string sender, string senderName, string recipient, string subject, string body, MailFormat bodyFormat ) : String

Send an e-mail message.

Send ( string senderAddress, string senderName, string recipient, string subject, string body, MailFormat bodyFormat, ArrayList attachments ) : String

Send an e-mail message with optional attachments.

Send ( string sender, string senderName, string recipient, string ccList, string bccList, string subject, string body, MailFormat bodyFormat ) : String

Send an e-mail message.

Private Methods

Method Description
H3Email ( ) : System

Method Details

BuildHtmlEmail() public static method

Build an HTML e-mail body from a container's form field objects.

Works with the following controls: TextBox, RadioButtonList, CheckBoxList, DropDownList, ListBox, HiddenField. Checkboxlists return comma-separated lists of values.

using Argentini.Halide; ... string emailBody = H3Email.BuildHtmlEmail("ContainerDiv1"); string result = H3Email.Send( "[email protected]", "[email protected],[email protected]", "Message subject here", emailBody, H3Email.MailFormat.Html);
public static BuildHtmlEmail ( Control containerControl ) : String
containerControl System.Web.UI.Control Container control whose children are to be evaluated and used.
return String

BuildPlainTextEmail() public static method

Build a plain text e-mail body from a container's form field objects.

Works with the following controls: TextBox, RadioButtonList, CheckBoxList, DropDownList, ListBox, HiddenField. Checkboxlists return comma-separated lists of values.

public static BuildPlainTextEmail ( Control containerControl ) : String
containerControl System.Web.UI.Control Container control whose children are to be evaluated and used.
return String

Send() public static method

Send an e-mail message with optional attachments.
public static Send ( String senderAddress, String senderName, String recipient, String ccList, String bccList, String subject, String body, MailFormat bodyFormat, ArrayList attachments, ArrayList attachmentNames, System.Boolean useSsl ) : String
senderAddress String From address (i.e. [email protected]).
senderName String From name (i.e. Joe).
recipient String To address(es), separated by commas.
ccList String Comma-separated list of e-mail addresses for carbon copies.
bccList String Comma-separated list of e-mail addresses for blind carbon copies.
subject String Message subject.
body String Message body.
bodyFormat MailFormat MailFormat value.
attachments System.Collections.ArrayList ArrayList object with virtual paths to files OR memory streams.
attachmentNames System.Collections.ArrayList ArrayList object with filenames for memory stream attachments.
useSsl System.Boolean Should SMTP use SSL
return String

Send() public static method

Send an e-mail message.
public static Send ( string sender, string recipient, string subject, string body, MailFormat bodyFormat ) : String
sender string From address (i.e. [email protected]).
recipient string To address(es), separated by commas.
subject string Message subject.
body string Message body.
bodyFormat MailFormat MailFormat value.
return String

Send() public static method

Send an e-mail message.
public static Send ( string sender, string senderName, string recipient, string subject, string body, MailFormat bodyFormat ) : String
sender string From address (i.e. [email protected]).
senderName string From name (i.e. Joe Smith).
recipient string To address(es), separated by commas.
subject string Message subject.
body string Message body.
bodyFormat MailFormat MailFormat value.
return String

Send() public static method

Send an e-mail message with optional attachments.
public static Send ( string senderAddress, string senderName, string recipient, string subject, string body, MailFormat bodyFormat, ArrayList attachments ) : String
senderAddress string From address (i.e. [email protected]).
senderName string From name (i.e. Joe).
recipient string To address(es), separated by commas.
subject string Message subject.
body string Message body.
bodyFormat MailFormat MailFormat value.
attachments System.Collections.ArrayList ArrayList object with virtual paths to files.
return String

Send() public static method

Send an e-mail message.
public static Send ( string sender, string senderName, string recipient, string ccList, string bccList, string subject, string body, MailFormat bodyFormat ) : String
sender string From address (i.e. [email protected]).
senderName string From name (i.e. Joe Smith).
recipient string To address(es), separated by commas.
ccList string Comma-separated list of e-mail addresses for carbon copies.
bccList string Comma-separated list of e-mail addresses for blind carbon copies.
subject string Message subject.
body string Message body.
bodyFormat MailFormat MailFormat value.
return String