我目前正在使用smtp从我的代码发送邮件,但似乎我们必须迁移到Exchange服务器,两者之间有区别吗? 我需要在代码中做些什么更改?
MailMessage loginInfo = new MailMessage();
loginInfo.To.Add("estinationaddress.@ca");
loginInfo.From = new MailAddress("abc@sde.ca");
loginInfo.Subject = "ABC";
loginInfo.Body = "Your username is: " +"abc";
loginInfo.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "www.smtphost.com";
smtp.Port = 25;
smtp.EnableSsl = false;
smtp.Credentials = new System.Net.NetworkCredential("abc@sde.ca","abc");
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;
smtp.Send(loginInfo);
我的代码需要进行哪些更改?