mirror of
https://github.com/jcreek/aspnetcore5-with-postgres-identity-serilog-elasticsearch.git
synced 2026-07-13 02:43:45 +00:00
29 lines
780 B
C#
29 lines
780 B
C#
using Microsoft.AspNetCore.Http;
|
|
using MimeKit;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
|
|
namespace My.ProjectName.Services.EmailService
|
|
{
|
|
public class Message
|
|
{
|
|
public List<MailboxAddress> To { get; set; }
|
|
public string Subject { get; set; }
|
|
public string Content { get; set; }
|
|
|
|
public IFormFileCollection Attachments { get; set; }
|
|
|
|
public Message(IEnumerable<string> to, string subject, string content, IFormFileCollection attachments = null)
|
|
{
|
|
To = new List<MailboxAddress>();
|
|
|
|
To.AddRange(to.Select(x => new MailboxAddress(x)));
|
|
Subject = subject;
|
|
Content = content;
|
|
Attachments = attachments;
|
|
}
|
|
}
|
|
}
|