using System.Collections;
using System.Dynamic;
using System.Runtime.CompilerServices;
using System.Text;
using System.Text.Json;
using Elsa.Email.Contracts;
using Elsa.Email.Models;
using Elsa.Email.Options;
using Elsa.Extensions;
using Elsa.Workflows;
using Elsa.Workflows.Attributes;
using Elsa.Workflows.UIHints;
using Elsa.Workflows.Models;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using MimeKit;
namespace Elsa.Email.Activities;
///
/// Send an email message.
///
[Activity("Elsa", "Email", "Send an email message.", Kind = ActivityKind.Task)]
public class SendEmail : Activity
{
///
public SendEmail([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line)
{
}
///
/// The sender's email address.
///
[Input(Description = "The sender's email address.")]
public Input From { get; set; } = default!;
///
/// The recipients email addresses.
///
[Input(Description = "The recipients email addresses.", UIHint = InputUIHints.MultiText)]
public Input> To { get; set; } = default!;
///
/// The CC recipient email addresses.
///
[Input(
Description = "The CC recipient email addresses.",
UIHint = InputUIHints.MultiText,
Category = "More")]
public Input> Cc { get; set; } = default!;
///
/// The BCC recipients email addresses.
///
[Input(
Description = "The BCC recipients email addresses.",
UIHint = InputUIHints.MultiText,
Category = "More")]
public Input> Bcc { get; set; } = default!;
///
/// The subject of the email message.
///
[Input(Description = "The subject of the email message.")]
public Input Subject { get; set; } = default!;
///
/// The attachments to send with the email message.
///
[Input(
Description = "The attachments to send with the email message. Can be (an array of) a fully-qualified file path, URL, stream, byte array or instances of EmailAttachment.",
UIHint = InputUIHints.MultiLine
)]
public Input