Show / Hide Table of Contents

Class EmailService

Сервис для отправки сообщений на почту

Inheritance
object
EmailService
Implements
IEmailService
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: NotifyHub.NotificationService.Infrastructure.Services
Assembly: NotifyHub.NotificationService.Infrastructure.dll
Syntax
public class EmailService : IEmailService

Constructors

| Edit this page View Source

EmailService(IConfiguration, ILogger<EmailService>)

Сервис для отправки сообщений на почту

Declaration
public EmailService(IConfiguration configuration, ILogger<EmailService> logger)
Parameters
Type Name Description
IConfiguration configuration
ILogger<EmailService> logger

Methods

| Edit this page View Source

GenerateMessage(string, string, string)

Создание письма перед отправкой

Declaration
public MimeMessage GenerateMessage(string email, string subject, string messageBody)
Parameters
Type Name Description
string email

Почта получателя

string subject

Тема письма

string messageBody

Текст сообщения

Returns
Type Description
MimeMessage

Объект MimeMessage для отправки на почту

| Edit this page View Source

SendEmailAsync(string, string, string)

Отправка письма

Declaration
public Task SendEmailAsync(string email, string subject, string messageBody)
Parameters
Type Name Description
string email

Почта пользователя

string subject

Заголовок сообщения

string messageBody

Сообщение

Returns
Type Description
Task

Implements

IEmailService
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX