C# Класс Framework.Core.Utilities.Email.MailTemplate

Template email class.
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
GetFullTemplatePath String

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
ReadTemplates ( String bodyTemplateFile ) : void

Initialize new instance of MailTemplate.

Приватные методы

Метод Описание
GetFullTemplatePath ( String path ) : String

Gets the full template path.

Описание методов

AddAttachment() публичный Метод

Add attachment.
public AddAttachment ( String path ) : void
path String Path to the file.
Результат void

AppendParam() публичный Метод

Appends param with its value to the email.
public AppendParam ( String key, String value ) : void
key String Param Key
value String Param value.
Результат void

AppendParam() публичный Метод

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.
Результат void

MailTemplate() публичный Метод

Initializes a new instance of the MailTemplate class.
public MailTemplate ( String bodyTemplate ) : System
bodyTemplate String The body template.
Результат System

MailTemplate() публичный Метод

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.
Результат System

ReadTemplates() защищенный Метод

Initialize new instance of MailTemplate.
protected ReadTemplates ( String bodyTemplateFile ) : void
bodyTemplateFile String Name of the body template.
Результат void

Send() публичный Метод

Send email.
public Send ( ) : bool
Результат bool

Send() публичный Метод

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.
Результат bool

SendMails() публичный Метод

Sends mails to list of recipients specified in MailAddressCollection.
public SendMails ( ) : bool
Результат bool