Files
DigitalData.MessagingService/src/core/DigitalData.MessagingService.Application/Common/Dto/EmailContext.cs
TekH 91581649ba Refactor namespaces and remove Abstraction project
Replaced `DigitalData.MessagingService.Abstraction` with
`DigitalData.MessagingService.Application.Common.Dto` and
`DigitalData.MessagingService.Application.Common.Dto.MailSearch`
to improve modularity and organization.

Removed the `Abstraction` project and updated all references
to use the `Application` project. Updated namespaces, `using`
directives, and dependencies across the codebase.

Refactored interfaces, commands, queries, validators, and
services to use the new DTOs. Updated RabbitMQ integration,
AutoMapper profiles, background services, and tests to align
with the new structure.

Performed general cleanup by removing redundant `using`
directives and obsolete references.
2026-08-12 15:13:15 +02:00

55 lines
1.4 KiB
C#

namespace DigitalData.MessagingService.Application.Common.Dto;
public record EmailContext
{
#if NETFRAMEWORK
public EmailAccountDto Sender { get; set; } = null!;
#else
public required EmailAccountDto Sender { get; init; }
#endif
/// <summary>
/// Recipient email address
/// </summary>
#if NETFRAMEWORK
public IEnumerable<string> Recipients { get; set; } = null!;
#else
public required IEnumerable<string> Recipients { get; init; }
#endif
/// <summary>
/// Email subject
/// </summary>
#if NETFRAMEWORK
public string Subject { get; set; } = null!;
#else
public required string Subject { get; init; }
#endif
/// <summary>
/// Email body (HTML or plain text)
/// </summary>
#if NETFRAMEWORK
public string Body { get; set; } = null!;
#else
public required string Body { get; init; }
#endif
/// <summary>
/// Is HTML email (default: true)
/// </summary>
#if NETFRAMEWORK
public bool IsHtml { get; set; } = true;
#else
public bool IsHtml { get; init; } = true;
#endif
/// <summary>
/// Optional list of attachments to include with the email.
/// Each entry may carry its content as a byte array (<see cref="EmailAttachmentDto.Content"/>)
/// or reference a file on disk via <see cref="EmailAttachmentDto.FilePath"/>.
/// </summary>
public IEnumerable<EmailAttachmentDto> Attachments { get; set; } = [];
}