feature: email service and configuration

This commit is contained in:
Gary Sharp
2021-01-10 13:57:25 +11:00
parent af4a94870e
commit 806aadd161
14 changed files with 1229 additions and 186 deletions
+30
View File
@@ -0,0 +1,30 @@
using System.Collections.Generic;
namespace Disco.Models.Services.Messaging
{
public class Email
{
public string From { get; set; }
public List<string> To { get; } = new List<string>();
public List<string> CC { get; } = new List<string>();
public List<string> BCC { get; } = new List<string>();
public string Subject { get; set; }
public bool IsBodyHtml { get; set; }
public string Body { get; set; }
public List<EmailAttachment> Attachments { get; } = new List<EmailAttachment>();
public Email()
{
}
public Email(string to, string subject, string body)
: this()
{
To.Add(to);
Subject = subject;
Body = body;
}
}
}
@@ -0,0 +1,8 @@
namespace Disco.Models.Services.Messaging
{
public class EmailAttachment
{
public string Name { get; set; }
public byte[] Data { get; set; }
}
}