22 lines
664 B
C#
22 lines
664 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace CPRNIMS.Infrastructure.Dto.SMTP
|
|
{
|
|
public class EmailValidationResult
|
|
{
|
|
public string Email { get; set; } = string.Empty;
|
|
public bool IsValid { get; set; }
|
|
public string Reason { get; set; } = string.Empty;
|
|
|
|
public static EmailValidationResult Pass(string email) =>
|
|
new() { Email = email, IsValid = true, Reason = "OK" };
|
|
|
|
public static EmailValidationResult Fail(string email, string reason) =>
|
|
new() { Email = email, IsValid = false, Reason = reason };
|
|
}
|
|
}
|