[英]Validate subject line of an email message
只要確保沒有換行符或回車符。 這就是System.Net.Mail
所做的。
//This is from the MailBnfHelper class of the System.Net.Mime namespace.
internal static bool HasCROrLF(string data)
{
for (int index = 0; index < data.Length; ++index)
{
if (data[index] == '\r' || data[index] == '\n')
return true;
}
return false;
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.