顯示具有 System.Net.Mail.MailMessage 標籤的文章。 顯示所有文章
顯示具有 System.Net.Mail.MailMessage 標籤的文章。 顯示所有文章

2025年10月17日 星期五

[研究]System.Net.Mail.MailMessage 寄信成功,MailKit 出現 "5.7.60 SMTP; Client does not have permissions to send as this sender"

[研究]System.Net.Mail.MailMessage 寄信成功,MailKit 出現 "5.7.60 SMTP; Client does not have permissions to send as this sender"

2025-10-17

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C# + SQL Server 2019 + SQL Server Management Studio (SSMS) 19

********************************************************************************

在 Exchange 上相同的帳號、密碼,

用 System.Net.Mail.MailMessage 透過 Exchange 寄信正常 

用 MailKit 透過 Exchange 寄信出現 "5.7.60 SMTP; Client does not have permissions to send as this sender"

怎麼回事 ?

ChatGPT

這個狀況非常常見,原因主要是 Exchange 的身分驗證與寄件人權限機制 導致的

MailKit 嘗試以一個「未被授權的寄件者」身份發信,Exchange 判定該帳號沒有 “Send As” 權限。

🧠 背後原理差異

1️⃣ System.Net.Mail 與 Exchange 的行為

System.Net.Mail 通常使用傳統 SMTP AUTH(登入帳號作為寄件者),Exchange 會「自動容忍」寄件人欄(From:)與登入帳號相同的情況。有些舊 Exchange 甚至會自動改寫寄件人成為登入者帳號。

例如:


            
var msg = new MailMessage("userA@example.com", "test@example.com", "Test", "Hello");
var smtp = new SmtpClient("exchange.example.com");
smtp.Credentials = new NetworkCredential("userA@example.com", "password");
smtp.Send(msg);

✅ 正常寄出。

2️⃣ MailKit 的行為

MailKit 比較嚴格,它會「照原樣」送出 MAIL FROM: 與 From: 標頭。

如果你的程式這樣寫:

var message = new MimeMessage();
message.From.Add(new MailboxAddress("userB@example.com"));
message.To.Add(new MailboxAddress("test@example.com"));
message.Subject = "Test";
message.Body = new TextPart("plain") { Text = "Hello" };

using (var client = new SmtpClient())
{
    client.Connect("exchange.example.com", 587, SecureSocketOptions.StartTls);
    client.Authenticate("userA@example.com", "password");
    client.Send(message);
    client.Disconnect(true);
}

Exchange 看到:

  • 登入帳號:userA@example.com

  • 寄件人:userB@example.com

它就會拒絕,回:

5.7.60 SMTP; Client does not have permissions to send as this sender


✅ 解法

✅ 方法一:確保寄件人與登入帳號一致

最簡單:


            
message.From.Add(new MailboxAddress("userA@example.com"));   

或乾脆讓 From 直接由登入帳號動態填入。

✅ 方法二:給帳號「Send As」或「Send on Behalf」權限

如果真的需要用別的寄件人(例如共用信箱),請在 Exchange 管理介面設定:

在 Exchange Admin Center (EAC):

  1. 選該信箱(例如 shared@example.com)
  2. 點「Mailbox Delegation」
  3. 在 Send As 欄位中加入該使用者帳號(userA@example.com)→ 或者在 Send on behalf 欄位中加入

完成後,MailKit 才能以該信箱名義發信。

✅ 方法三:確認使用的驗證方式

有時 System.Net.Mail 與 MailKit 使用不同協議層:

類別 驗證方式 備註
System.Net.Mail 基於 NTLM / Integrated Auth 內部網域帳號可通過
MailKit 預設使用 AUTH LOGIN / PLAIN 需明確授權

若你是內網 Exchange,可嘗試:


            
client.Authenticate(new SaslMechanismNtlm("DOMAIN\\userA", "password"));   


            
client.Authenticate(new SaslMechanismGssapi());   

(取決於伺服器允許的機制)

🧩 小結

原因 解法
寄件人 (From:) 與登入帳號不一致 改為相同
需要代寄別的信箱 在 Exchange 給「Send As」或「Send on behalf」權限
驗證機制不同 改用 NTLM / GSSAPI
System.Net.Mail 自動容忍,MailKit 不會 屬於設計差異,非 MailKit 錯誤

********************************************************************************

敝人最後用 "確保寄件人與登入帳號一致" 的方法,解決問題了。

(完)

相關

[研究]ASP.NET WebForm 寄信元件與 SMTP Server 寄信相容性比較

[研究]ASP.NET WebForm 寄信元件與 SMTP Server 寄信相容性比較

2025-10-17 

ASP.NET Webform 網站,用下面元件

Cpi.Net.SecureMail

System.Web.Mail.MailMessage (過時)

System.Net.Mail.MailMessage

MailKit

與下面 Mail Server 搭配,

Exchange Server

Postfix 

用 C# 寫程式寄信的相容性如何?

ChatGPT

🧩 一、相容性總覽表

寄信元件 協定支援 Exchange Server 相容性 Postfix 相容性 備註
Cpi.Net.SecureMail SMTP / SMTPS (465, 587) ✅ 良好(支援 AUTH LOGIN / NTLM) ✅ 良好 商業套件,封裝較完善,常用於舊專案。
System.Web.Mail.MailMessage (過時) CDOSYS / SMTP ⚠️ 有時會被 Exchange 拒絕 (安全性不足) ⚠️ 可用但建議不用 .NET 1.x 遺留元件,不支援 SSL/TLS,已被取代。
System.Net.Mail.MailMessage SMTP / SMTPS (465, 587) ✅ 完整支援 (Exchange SMTP AUTH) ✅ 完整支援 標準選項,支援 SSL/TLS、憑證驗證。
MailKit (MimeKit) SMTP / ESMTP / OAuth2 ✅ 支援,但需設定 “SendAs” 權限 ✅ 完整支援 最強大功能完整,支援 OAuth、STARTTLS、MIME。

🧠 二、詳細說明與差異分析

1️⃣ Cpi.Net.SecureMail

  • 📦 定位:第三方封裝 SMTP 的元件,支援 SSL。
  • 🧩 特色:
    • 支援 SMTP AUTH、TLS/SSL。
    • 可與 Exchange 或 Postfix 正常運作。
  • ⚠️ 注意事項:
    • 部分版本預設只支援「AUTH LOGIN」,若 Exchange 只啟用 NTLM/Negotiate,需手動設定。
    • 若 Exchange 要求「Send As」權限,仍須在 AD 中設定。

2️⃣ System.Web.Mail.MailMessage (過時)

  • 📦 定位:ASP.NET 1.x 時代的 CDOSYS 包裝。
  • ❌ 問題:
    • 只支援「明文 SMTP」。
    • 不支援 TLS/SSL。
    • .NET Framework 2.0 起官方建議改用 System.Net.Mail。
  • ⚠️ 現實影響:
    • 現代 Exchange Server、Postfix 預設強制加密(STARTTLS),此元件通常無法連線。
    • 若伺服器允許 25 port 明文傳送,仍可工作,但非常不安全。

3️⃣ System.Net.Mail.MailMessage

  • 📦 定位:.NET 2.0+ 內建的標準 SMTP 用 API。
  • ✅ 優點:
    • 支援 SSL (EnableSsl = true)。
    • 可設定憑證驗證、自訂 port。
    • 與 Exchange、Postfix 完全相容。
  • ⚠️ 注意事項:
    • 若用 Exchange 且出現錯誤「5.7.60 Client does not have permissions to send as this sender」,代表帳號沒有 “Send As” 權限。可由 Exchange 管理員設定。
    • 不支援 OAuth2(僅支援基本帳密驗證)。

4️⃣ MailKit / MimeKit

  • 📦 定位:現代化的 SMTP/IMAP/POP3 封裝庫。
  • ✅ 優點:
    • 完整支援 SSL/TLS、OAuth2。
    • 完全相容 Postfix。
    • 支援 Exchange(EWS 例外),但 SMTP AUTH 須正確配置。
  • ⚠️ 注意事項:
    • 若 Exchange 啟用「Modern Auth」(OAuth),需配合 Microsoft Entra 應用註冊。
    • 若只允許 NTLM 而未啟用 AUTH LOGIN/PLAIN,MailKit 會出現:
    • 5.7.60 SMTP; Client does not have permissions to send as this sender
    • 解法是在 Exchange 中允許 AUTH LOGIN 或調整「Send As」權限。

⚙️ 三、建議使用組合

環境 建議元件 備註
ASP.NET WebForm + Exchange Server(on-prem) System.Net.Mail.MailMessage 最穩定,簡單配置。若有 OAuth 要求,可升級 MailKit。
ASP.NET WebForm + Exchange Online (Microsoft 365) MailKit 支援 OAuth2 / Modern Auth。
ASP.NET WebForm + Postfix System.Net.Mail.MailMessageMailKit 兩者皆穩定。MailKit 若需大量寄信效能更好。
舊專案維護,不可改架構 Cpi.Net.SecureMail 可作為過渡方案,但建議逐步改為 System.Net.Mail。

🧾 四、簡短結論

用途 建議
安全性優先 MailKit(支援 TLS + OAuth)
相容性最佳 System.Net.Mail.MailMessage
老舊程式維護 Cpi.Net.SecureMail
不再建議使用 System.Web.Mail.MailMessage(過時)

(完)

2022年12月19日 星期一

[研究][ASP.NET 使用 System.Net.Mail.MailMessage 元件 + MDaemon 22.0.3 郵件伺服器寄非加簽信

[研究][ASP.NET 使用 System.Net.Mail.MailMessage 元件 + MDaemon 22.0.3 郵件伺服器寄非加簽信

2022-12-19

[研究]Alt-N MDaemon Email Server 22.0.3郵件伺服器 30 天試用版安裝 (Windows Server 2022)
http://shaurong.blogspot.com/2022/12/alt-n-mdaemon-email-server-2203-30.html
架設完成後,請允許 relay (預設不允許)

環境:Visual Studio 2022 + ASP.NET + WebForm + Web Application + C#

********************************************************************************

Default.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <asp:Button ID="Button_SendMail" runat="server" Text="Send" OnClick="Button_SendMail_Click" />
            <br />
            <asp:Label ID="Label_MSG1" runat="server"></asp:Label>
        </div>
    </form>
</body>
</html>



下面信件主旨、內容、寄信者、收信者、IP、寄信長號、密碼請依據實際情況修改。

Default.aspx.cs

using System;
//----------------------------------------
//1.先在專案中加入組件參考:System.Security
//2.設定 using 以下兩個命名空間 System.Security 和 System.Net.Mail.MailMessage
//using MailMessage = System.Web.Mail.MailMessage; ///過時
using MailMessage = System.Net.Mail.MailMessage;

namespace WebApplication1
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button_SendMail_Click(object sender, EventArgs e)
        {

            //https://learn.microsoft.com/zh-tw/dotnet/api/system.net.mail.mailmessage?view=netframework-4.8

            // public MailMessage (string from, string to, string subject, string body);
            MailMessage message = new MailMessage(
                "jane@contoso.com",
                "user1@contoso.com",
"Quarterly data report.", "See the attached spreadsheet.");
string smtpServer = "10.3.99.121"; int smtpPort = 25; string mailAccount = "user1"; string mailPwd = "1234"; System.Net.Mail.SmtpClient client = new System.Net.Mail.SmtpClient( smtpServer, smtpPort) { Credentials = new System.Net.NetworkCredential( mailAccount, mailPwd) }; try { // UseDefaultCredentials如果 屬性設定為 false, ,則連接到伺服器時,屬性中所 Credentials 設定的值將會用於認證。 // UseDefaultCredentials如果 屬性設定 false 為 ,而且 Credentials 屬性尚未設定,則郵件會以匿名方式傳送至伺服器。 client.UseDefaultCredentials = true; // 根據驗證程序,遠端憑證是無效的。=> 會出錯,下面這一行必須註解掉 // 原因:mail server和client使用ssl連線,但ssl憑證並沒有經過認證(ex:自簽憑證 Self Signed Certifcate) // client.EnableSsl = true; // 解決「根據驗證程序,遠端憑證是無效的。」,不管驗證結果 true 或 false,都當 true //ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true; //ServicePointManager.ServerCertificateValidationCallback += delegate { return true; }; System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate { return true; }; client.EnableSsl = true; // MDaemon 22.0.3 client.Send(message); Label_MSG1.ForeColor = System.Drawing.Color.Green; Label_MSG1.Text = DateTime.Now.ToString() + " 寄信成功。"; } catch (Exception ex) { Label_MSG1.ForeColor = System.Drawing.Color.Red; Label_MSG1.Text = "不明錯誤。"; if (ex != null) Label_MSG1.Text = ex.Message.ToString(); } } } }

Relay 沒有允許 (預設)

From 的 Email 若是 MDaemon 上的,會出現錯誤。

SMTP 伺服器需要安全連接,或用戶端未經驗證。 伺服器回應為: 5.7.0 Authentication required

From 的 Email 若非 MDaemon 上的,會出現錯誤。

無法使用信箱。 伺服器回應為: 5.1.1 Recipient unknown


Relay 允許後

實際測試,client.EnableSsl = false; 也可以。

實際測試,
client.UseDefaultCredentials = false;
client.EnableSsl = true;
也可以。

實際測試,
client.UseDefaultCredentials = false;
client.EnableSsl = false;
也可以。

(完)

相關

2019年10月9日 星期三

[研究][C#][ASP.NET] 加簽寄信 (使用 System.Net.Mail.MailMessage)

[研究][C#][ASP.NET] 加簽寄信 (使用 System.Net.Mail.MailMessage)

2019-09-30
2020-01-16 更新 Server.MapPath 問題
2022-06-06 Email憑證建議改用憑證序號抓

********************************************************************************
相關3篇

[研究][C#][ASP.NET] 加簽寄信 (使用 MailKit 和 MimeKit)
https://shaurong.blogspot.com/2019/10/caspnet-mailkit-mimekit_13.html

[研究][C#][ASP.NET] 寄信 (使用 MailKit 和 MimeKit)
https://shaurong.blogspot.com/2019/10/caspnet-mailkit-mimekit_11.html

[研究][C#][ASP.NET] 加簽寄信 (使用 System.Net.Mail.MailMessage)
https://shaurong.blogspot.com/2019/10/caspnet-systemnetmailmailmessage.html

********************************************************************************


本篇不需要用到 Cpi.Net.SecureMail,就可以寄加簽 ( signed mail ) 信件。
加密信 (encrypted  mail ) 有待研究。

綠色的部分依據自己情況換掉。

NuGet 要安裝 System.Security.Cryptography.Pkcs

Web.Config 部分

<?xml version="1.0" encoding="utf-8"?>
<configuration>
	<appSettings>
		<add key="EmailCertificateSN" value="郵件憑證序號" />
	</appSettings>
</configuration>

WebApplication1.aspx.cs


using System;
using System.IO;
using System.Net.Mail;
using System.Security.Cryptography.Pkcs;
using System.Security.Cryptography.X509Certificates;
using System.Text;
//1. 先在專案中加入組件參考:System.Security
//2. 設定 using 以下兩個命名空間 System.Security 和 System.Net.Mail.MailMessage
using System.Security;
//using MailMessage = System.Web.Mail.MailMessage; ///過時
using MailMessage = System.Net.Mail.MailMessage;
using System.Net;

namespace WebApplication1
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            //3.郵件內容
            string emailContent = "Email Content";
                     
            StringBuilder sb = new StringBuilder();

            sb.AppendLine("Content-Type: text/html; charset=\"big5\"");
            sb.AppendLine("Content-Transfer-Encoding: 8bit");
            sb.AppendLine();
            sb.AppendLine(emailContent.ToString());

            byte[] data = Encoding.GetEncoding("Big5").GetBytes(sb.ToString());

            // 4.替郵件內容做簽章(重點程式)

            // 方法1 (更換憑證方便,但密碼顯示程式中 )

            // 如果是寫在 Class1.cs 等類別程式中,HttpContext.Current 不可省略
            // string pfxPath = HttpContext.Current.Server.MapPath("/App_Data/TestEmailCert.pfx");
            //string pfxPassword = "test";
            //X509Certificate2 certificate = new X509Certificate2(pfxPath, pfxPassword);

            //ContentInfo content = new ContentInfo(data);
            //SignedCms signedCms = new SignedCms(content, false);
            //CmsSigner signer = new CmsSigner(SubjectIdentifierType.IssuerAndSerialNumber, certificate);
            //signedCms.ComputeSignature(signer);
            //byte[] signedbytes = signedCms.Encode();

            // 4方法 2 (憑證必須先匯入本機憑證儲存區,手續麻煩,但密碼不顯示程式中 )
            X509Store store = new X509Store("My", StoreLocation.LocalMachine);
            store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly);

// //「憑證名稱」為「mmc / 憑證(本機電腦) / 個人 / 憑證」右邊視窗的「發給」欄位顯示的名稱。如果新舊憑證都尚未過期,會抓到舊的憑證
             // X509Certificate2 signCert = store
                .Certificates.Find(X509FindType.FindBySubjectName, "憑證名稱", false)[0];

            // 用郵件憑證序號抓
            X509Certificate2 signCert = store.Certificates.Find(X509FindType.FindBySerialNumber, emailCertificateSN, false)[0];

            setting = ConfigurationManager.AppSettings["EmailCertificateSN"];
            string emailCertificateSN = setting.ToString();

            SignedCms signedCms = new SignedCms(new ContentInfo(data), false);
            CmsSigner signer = new CmsSigner(SubjectIdentifierType.IssuerAndSerialNumber, signCert);
            signedCms.ComputeSignature(signer);
            byte[] signedbytes = signedCms.Encode();

            //5.郵件內容
            MailMessage msg = new MailMessage();
            msg.From = new MailAddress("from@example.com");
            msg.To.Add(new MailAddress("to@example.com"));
            msg.Subject = "test s/mime";
            // 千萬不要加上 msg.Body 內容,否則驗證 S/MIME 郵件時會失敗
            // msg.Body = EmailBody;

            ///6.將簽章內容加入到訊息的另一個 View 中( AlternateView ),可以「讀取 S/ MIME 郵件」的人可開啟 S/ MIME 郵件檢視,無法讀取「S/ MIME 郵件」的人也可以看到郵件。

            MemoryStream ms = new MemoryStream(signedbytes);
            AlternateView av = new AlternateView(ms,
                "application/pkcs7-mime; smime-type=signed-data;name=smime.p7m");
            msg.AlternateViews.Add(av);

            //7.寄出郵件
            SmtpClient client = new SmtpClient("localhost", 25);
            client.UseDefaultCredentials = true;
            try
            {
                 client.Credentials = new NetworkCredential("YourSmtpUserName", "YourSmtpPassword");
                client.Send(msg);
                Label1.Text = "成功。";
            }
            catch (Exception ex)
            {
                if (ex ==null)
                {
                    Label1.Text = "不明錯誤。";
                }
                else
                {
                    Label1.Text = ex.Message.ToString();
                }
            }
        }
    }
}


Email 憑證匯入本機憑證儲存區 ,請看下面這篇

[研究][C#]加密加簽寄信(使用Cpi.Net.SecureMail)(二)
http://shaurong.blogspot.com/2017/02/ccpinetsecuremail_13.html

憑證名稱請看下圖

********************************************************************************

以 Windows Server 2019 IIS SMTP 當 localhost  port 25 寄信測試。

收件者是 MAIL2000 信箱可以收到信。
收件者是 Gmail 信箱收不到到信。(畢竟 IIS SMTP 不是正式有 FQDN 的 Mail Server )
收件者是公司信箱不一定,若在公司測試,可以收到信;家中電腦測試,收不到。(可能驗證來源 IP 是否公司使用的 IP )
收件者是 "十分鐘信箱",可以收到信。

********************************************************************************
2021-11-18

System.Security.Cryptography.CryptographicException
  HResult=0x800B010A
  Message=憑證鏈結無法建立於受信任的根授權。

  Source=<無法評估例外狀況來源>
  StackTrace: 
<無法評估例外狀況堆疊追蹤>

[研究][ASP.NET]加簽寄信失敗-憑證鏈結無法建立於受信任的根授權

********************************************************************************
2021-11-19
client.Send(msg); 會被 Fortify SCA 報告有問題
client.UseDefaultCredentials = true; 之後,client.Send(msg); 之前請加上程式 

            client.UseDefaultCredentials = true;
            try
            {
                 client.Credentials = new NetworkCredential("YourSmtpUserName", "YourSmtpPassword");
                client.Send(msg);
                Label1.Text = "成功。";
            }


改為 


//Fortify SCA : Critical : Insecure Transport Mail Transmission
//需用加密連線,加上 client.UseDefaultCredentials = true; 和 client.EnableSsl = true;

// 只有 client.UseDefaultCredentials = true; 一個寄信成功,但是 Fortify SCA 會報告
client.UseDefaultCredentials = true;    // OK

// 根據驗證程序,遠端憑證是無效的。=> 會出錯,下面這一行必須註解掉
// 原因:mail server和client使用ssl連線,但ssl憑證並沒有經過認證(ex:自簽憑證 Self Signed Certifcate)
// client.EnableSsl = true;

// 解決「根據驗證程序,遠端憑證是無效的。」,不管驗證結果 true 或 false,都當 true
//ServicePointManager.ServerCertificateValidationCallback +=  (sender, cert, chain, sslPolicyErrors) => true;
//ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
System.Net.ServicePointManager.ServerCertificateValidationCallback += delegate { return true; };
client.EnableSsl = true;

try
{
    client.Credentials = new NetworkCredential("YourSmtpUserName", "YourSmtpPassword");
    client.Send(msg);
    Label1.Text = "成功。";
}


********************************************************************************
2021-11-29

System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
會被Fortify SCA報告Insecure SSL: Server Identity Verification Disabled

解法

[研究]Fortify SCA報告Insecure SSL: Server Identity Verification Disabled

********************************************************************************
2021-11-29 補

[研究][ASP.NET]不能為收取目錄傳遞方法啟用 SSL。

********************************************************************************

(完)


相關

.NET Framework 中過時的類型
https://docs.microsoft.com/zh-tw/dotnet/framework/whats-new/obsolete-types
System.Web.Mail.SmtpMail 過時,建議的替代做法是 System.Net.Mail.SmtpClient。

System.Net.Mail.SmtpClient
https://docs.microsoft.com/zh-tw/dotnet/api/system.net.mail.smtpclient?view=netframework-4.8
System.Net.Mail.SmtpClient 淘汰,建議改用 https://github.com/jstedfast/MailKit 和 https://github.com/jstedfast/MimeKit

GitHub - jstedfast/MailKit: A cross-platform .NET library for IMAP, POP3, and SMTP.
https://github.com/jstedfast/MailKit

GitHub - jstedfast/MimeKit: A .NET MIME creation and parser library with support for S/MIME, PGP, DKIM, TNEF and Unix mbox spools.
https://github.com/jstedfast/MimeKit

[研究][C#][ASP.NET] 加簽寄信 (使用 System.Net.Mail.MailMessage)
https://shaurong.blogspot.com/2019/10/caspnet-systemnetmailmailmessage.html

[研究][C#]加密加簽寄信(使用Cpi.Net.SecureMail)(一)
http://shaurong.blogspot.com/2017/02/ccpinetsecuremail.html

[研究][C#]加密加簽寄信(使用Cpi.Net.SecureMail)(二)
http://shaurong.blogspot.com/2017/02/ccpinetsecuremail_13.html

[研究][C#][ASP.NET] IIS SMTP 寄信失敗,拒絕存取路徑
https://shaurong.blogspot.com/2019/10/caspnet-iis-smtp.html

[研究] [ASP.NET] [C#] [WebForm] 寄信問題
http://shaurong.blogspot.com/2017/06/aspnet-c-webform.html

An S/MIME Library for Sending Signed and Encrypted E-mail
Pete Everett, 15 Jul 2010
https://www.codeproject.com/Articles/41727/An-S-MIME-Library-for-Sending-Signed-and-Encrypted

ASP.NET寄發加密加簽信件
https://www.nccst.nat.gov.tw/ArticlesDetail?lang=zh&seq=1160

Cpi.Net.SecureMail
https://www.codeproject.com/script/Content/ViewAssociatedFile.aspx?rzp=%2FKB%2Fsecurity%2FCPI_NET_SecureMail%2F%2FCpi.Net.SecureMail_src.zip&zep=Cpi.Net.SecureMail_src%2FCpi.Net.SecureMail%2FSecureMailMessage.cs&obid=41727&obtid=2&ovid=5

如何透過 .NET 送出一個包含 S/MIME 簽章的郵件
2009/06/06 21:20
https://blog.miniasp.com/post/2009/06/06/How-to-send-s-mime-email-using-net