先在 Hostgator Back-end 中, Create 一個 email account在 DNS 上做好 Domain Mapping, 確定該 email 可以被存取到.在 ASP.net 的 Page 使用下列 Code
MailMessage oMail = new System.Net.Mail.MailMessage();// mailid: should include domain, ex, info@abc.barksoftware.com smtp.Credentials = new System.Net.NetworkCredential(mailid, mailpw);
|