C# Class Framework.Core.Utilities.Email.MailTemplate

Template email class.
Afficher le fichier Open project: coreframework/Core-Framework Class Usage Examples

Private Properties

Свойство Type Description
GetFullTemplatePath String

Méthodes publiques

Méthode Description
AddAttachment ( String path ) : void

Add attachment.

AppendParam ( String key, String value ) : void

Appends param with its value to the email.

AppendParam ( String key, String value, bool encode ) : void

Apends param to the email.

MailTemplate ( String bodyTemplate ) : System

Initializes a new instance of the MailTemplate class.

MailTemplate ( String templateDirectory, String bodyTemplate ) : System

Initializes a new instance of the MailTemplate class.

Send ( ) : bool

Send email.

Send ( String smtpHost, String user, String password ) : bool

Send email.

SendMails ( ) : bool

Sends mails to list of recipients specified in MailAddressCollection.

Méthodes protégées

Méthode Description
ReadTemplates ( String bodyTemplateFile ) : void

Initialize new instance of MailTemplate.

Private Methods

Méthode Description
GetFullTemplatePath ( String path ) : String

Gets the full template path.

Method Details

AddAttachment() public méthode

Add attachment.
public AddAttachment ( String path ) : void
path String Path to the file.
Résultat void

AppendParam() public méthode

Appends param with its value to the email.
public AppendParam ( String key, String value ) : void
key String Param Key
value String Param value.
Résultat void

AppendParam() public méthode

Apends param to the email.
public AppendParam ( String key, String value, bool encode ) : void
key String Param key.
value String Param value.
encode bool If true. the param value will be encided.
Résultat void

MailTemplate() public méthode

Initializes a new instance of the MailTemplate class.
public MailTemplate ( String bodyTemplate ) : System
bodyTemplate String The body template.
Résultat System

MailTemplate() public méthode

Initializes a new instance of the MailTemplate class.
public MailTemplate ( String templateDirectory, String bodyTemplate ) : System
templateDirectory String The template directory.
bodyTemplate String The body template.
Résultat System

ReadTemplates() protected méthode

Initialize new instance of MailTemplate.
protected ReadTemplates ( String bodyTemplateFile ) : void
bodyTemplateFile String Name of the body template.
Résultat void

Send() public méthode

Send email.
public Send ( ) : bool
Résultat bool

Send() public méthode

Send email.
public Send ( String smtpHost, String user, String password ) : bool
smtpHost String The SMTP host.
user String The SMTP user.
password String The SMTP password.
Résultat bool

SendMails() public méthode

Sends mails to list of recipients specified in MailAddressCollection.
public SendMails ( ) : bool
Résultat bool