"不允許使用郵箱名稱。 服務器響應為: You are not authorized to send mail, au... "
發送郵件時遇到如上問題,請按如下方法解決:
將
smtpClIEnt.UseDefaultCredentials = true;
這一句放到
NetworkCredential credential = new NetworkCredential(username, passWord);
smtpClIEnt.Credentials = credential;
這兩句的前面即可.