功能添加
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 20s
Docker Build & Deploy / Deploy to Production (push) Successful in 5s

This commit is contained in:
孙诚
2025-12-26 15:21:31 +08:00
parent 7dfb6a5902
commit cb11d80d1f
26 changed files with 2208 additions and 841 deletions

View File

@@ -1,4 +1,6 @@
namespace Entity;
using System.Security.Cryptography;
namespace Entity;
/// <summary>
/// 邮件消息实体
@@ -29,4 +31,14 @@ public class EmailMessage : BaseEntity
/// 邮件接收时间
/// </summary>
public DateTime ReceivedDate { get; set; }
public string Md5 { get; set; } = string.Empty;
public string ComputeBodyHash()
{
using var md5 = MD5.Create();
var inputBytes = System.Text.Encoding.UTF8.GetBytes(Body + HtmlBody);
var hashBytes = md5.ComputeHash(inputBytes);
return Convert.ToHexString(hashBytes);
}
}