using System.Collections.Generic;
using System.Linq;
namespace Umbraco.Cms.Core.Models.Email
{
///
/// Represents an email when sent with notifications.
///
public class NotificationEmailModel
{
public NotificationEmailAddress From { get; }
public IEnumerable To { get; }
public IEnumerable Cc { get; }
public IEnumerable Bcc { get; }
public IEnumerable ReplyTo { get; }
public string Subject { get; }
public string Body { get; }
public IList Attachments { get; }
public bool HasAttachments => Attachments != null && Attachments.Count > 0;
public NotificationEmailModel(
NotificationEmailAddress from,
IEnumerable to,
IEnumerable cc,
IEnumerable bcc,
IEnumerable replyTo,
string subject,
string body,
IEnumerable attachments)
{
From = from;
To = to;
Cc = cc;
Bcc = bcc;
ReplyTo = replyTo;
Subject = subject;
Body = body;
Attachments = attachments?.ToList();
}
}
}