在 ASP.NET 或 ASP.NET MVC 应用程序中,如果我使用 SmtpClient
发送电子邮件与 UseDefaultCredentials
设置为true
,哪个用户将用于向邮件服务器进行身份验证?
最佳答案
如果UseDefaultCredentials
属性设置为 true
,SmtpClient
将使用提供给
DefaultCredentials
属性(property)在 CredentialCache
类。
来自MSDN :
For ASP.NET applications, the default credentials are the user credentials of the logged-in user, or the user being impersonated.
关于asp.net - 在 ASP.NET 应用程序中将 SmtpClient.UseDefaultCredentials 设置为 true 时将使用哪个用户?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16681686/