Table of Contents

Class SmtpClientService

Namespace
SEBT.Portal.Infrastructure.Services
Assembly
SEBT.Portal.Infrastructure.dll

Service for sending emails using SMTP protocol.

public class SmtpClientService : ISmtpClientService
Inheritance
object
SmtpClientService
Implements

Remarks

This service wraps the System.Net.Mail.SmtpClient to provide email sending capabilities with configuration from SmtpClientSettings.

Constructors

SmtpClientService(IOptionsMonitor<SmtpClientSettings>, ILogger<SmtpClientService>)

Service for sending emails using SMTP protocol.

public SmtpClientService(IOptionsMonitor<SmtpClientSettings> optionsMonitor, ILogger<SmtpClientService> logger)

Parameters

optionsMonitor IOptionsMonitor<SmtpClientSettings>

Options monitor for SMTP client settings.

logger ILogger<SmtpClientService>

Logger instance for logging email operations.

Remarks

This service wraps the System.Net.Mail.SmtpClient to provide email sending capabilities with configuration from SmtpClientSettings.

Methods

SendEmailAsync(string, string, string, string)

public Task SendEmailAsync(string to, string from, string subject, string body)

Parameters

to string
from string
subject string
body string

Returns

Task

SendEmailAsync(string, string, string, string, IEnumerable<EmailLinkedResource>)

public Task SendEmailAsync(string to, string from, string subject, string body, IEnumerable<EmailLinkedResource> linkedResources)

Parameters

to string
from string
subject string
body string
linkedResources IEnumerable<EmailLinkedResource>

Returns

Task