C# Класс Summer.Batch.Extra.EmailSupport.EmailTasklet

Tasklet for sending emails. The host, from, subject and body fields are mandatory. The body is read from a resource. At least one recipient should be specified (in to, cc, or bcc).
Наследование: ITasklet, IInitializationPostOperations
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AfterPropertiesSet ( ) : void

@see IInitializationPostOperations#AfterPropertiesSet

DoExecute ( ) : bool

Inner execute.

Execute ( Summer.Batch.Core.StepContribution contribution, Summer.Batch.Core.Scope.Context.ChunkContext chunkContext ) : RepeatStatus

Send the mail message given all needed information. @see ITasklet#Execute

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

Метод Описание
CreateMailMessage ( ) : MailMessage

Create mail message

GetLines ( StreamReader reader ) : string

Read mail body, line by line of the specified LineLength size.

GetText ( ) : string

Read mail body from given file

SetupSmtpClient ( ) : SmtpClient

Setup smtp client

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

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

@see IInitializationPostOperations#AfterPropertiesSet
public AfterPropertiesSet ( ) : void
Результат void

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

Inner execute.
public DoExecute ( ) : bool
Результат bool

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

Send the mail message given all needed information. @see ITasklet#Execute
 
public Execute ( Summer.Batch.Core.StepContribution contribution, Summer.Batch.Core.Scope.Context.ChunkContext chunkContext ) : RepeatStatus
contribution Summer.Batch.Core.StepContribution
chunkContext Summer.Batch.Core.Scope.Context.ChunkContext
Результат RepeatStatus