mirror of
https://github.com/jcreek/aspnetcore5-with-postgres-identity-serilog-elasticsearch.git
synced 2026-07-13 02:43:45 +00:00
refactor(*): Move EmailService inside the main project
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user