SmtpMessageService

Implements an IMessageService that send messages through e-mail.

Namespace:
KpokPatagon.Messaging
Type:
Class
Public:
Yes
Protected:
No
Sealed:
Yes
Abstract:
No
Implements:
KpokPatagon.Messaging.IMessageService, KpokPatagon.Messaging.IEmailTransport

Constructors

SmtpMessageService

Initializes a new instance of SmtpMessageService.

Signature:
public Void SmtpMessageService(configuration)
Parameters
Name Type Summary
configuration ISmtpServerConfiguration Smpt server configuratión.

Methods

SendAsync

Sends the message through e-mail.

Signature:
public Task SendAsync(message)
Remarks

This method attempts to send the message only if it is consedered enabled otherwise it does nothing.

This service is considered enabled when the properties From and Server has been configured and the From property is a valid email address, otherwise this service is disabled.

Parameters
Name Type Summary
message Message A Message to be send by e-mail.
Exceptions
Type Summary
SendException Thrown when the message could not be send.

In this document