If you dont have any SMTP server then u cant send mails thats why I choosed to use google's smtp server.

I am using it as smtp.gmail.com for sending mails.

code look like:

 MailMessage mm = new MailMessage();
mm.From = new MailAddress("yourmail@gmail.com", "sharepoint");
mm.To.Add(new MailAddress("mail@gmail.com"));
mm.subject="subject";
mm.Body = "Body";
SmtpClient sc = new SmtpClient("smtp.gmail.com");
sc.Credentials = new System.Net.NetworkCredential("yourmail@gmail.com", "yourpassword");
sc.EnableSsl = true;
sc.Send(mm);

相关文章:

  • 2022-12-23
  • 2021-10-29
  • 2021-11-02
  • 2021-11-14
  • 2021-10-13
猜你喜欢
  • 2021-08-26
  • 2021-09-02
  • 2022-01-30
  • 2021-09-06
  • 2020-12-17
  • 2021-12-18
相关资源
相似解决方案