Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想制作一个程序来检查邮件和密码是否匹配。
SMTP.Credentials = New System.Net.NetworkCredential(email, pass) SMTP.Send(emailMessage)
我可以检查发送确定平均匹配,不能发送电子邮件并通过不匹配。但希望你能告诉我更好的方法。谢谢
如果不尝试发送,您将无法检查凭据。如果发送失败,它将抛出SmtpException。您可以检查SmtpStatusCode属性以获取更多详细信息。