// ========================================================================== // Squidex Headless CMS // ========================================================================== // Copyright (c) Squidex UG (haftungsbeschraenkt) // All rights reserved. Licensed under the MIT license. // ========================================================================== using System.ComponentModel.DataAnnotations; using Squidex.Domain.Apps.Core.HandleRules; using Squidex.Domain.Apps.Core.Rules; namespace Squidex.Extensions.Actions.Email { [RuleActionHandler(typeof(EmailActionHandler))] [RuleAction( IconImage = "", IconColor = "#333300", Display = "Send an email", Description = "Send an email with a custom SMTP server.", ReadMore = "https://en.wikipedia.org/wiki/Email")] public sealed class EmailAction : RuleAction { [Required] [Display(Name = "ServerHost", Description = "The IP address or host to the SMTP server.")] public string ServerHost { get; set; } [Required] [Display(Name = "ServerPort", Description = "The port to the SMTP server.")] public int ServerPort { get; set; } [Required] [Display(Name = "ServerUseSsl", Description = "Specify whether the SMPT client uses Secure Sockets Layer (SSL) to encrypt the connection.")] public bool ServerUseSsl { get; set; } [Required] [Display(Name = "ServerUsername", Description = "The username for the SMTP server.")] public string ServerUsername { get; set; } [Required] [Display(Name = "ServerPassword", Description = "The password for the SMTP server.")] public string ServerPassword { get; set; } [Required] [Display(Name = "MessageFrom", Description = "The email sending address.")] public string MessageFrom { get; set; } [Required] [Display(Name = "MessageTo", Description = "The email message will be sent to.")] public string MessageTo { get; set; } [Required] [Display(Name = "MessageSubject", Description = "The subject line for this email message.")] public string MessageSubject { get; set; } [Required] [Display(Name = "MessageBody", Description = "The message body.")] public string MessageBody { get; set; } } }