string password="ff";
            MailMessage messge = new MailMessage();
            messge.From = new MailAddress(messge.From.Address);
            messge.To.Add(new MailAddress("wjp@163.com"));
            messge.Subject = "password";
            messge.IsBodyHtml = false;

            messge.Body = "您的密码是:   " + password + "       " + DateTime.Now.ToString();
            SmtpClient sc = new SmtpClient();
            sc.Send(messge);




2.system.net>
    <mailSettings>
      <smtp deliveryMethod="Network" from="wjp@126.com">
        <network host="smtp.126.com" port="25" password="lf87" userName="wjp@126.com"/>
      </smtp>
    </mailSettings>
  </system.net>
</configuration>

相关文章:

  • 2021-12-31
  • 2021-07-28
猜你喜欢
  • 2021-05-19
  • 2021-07-18
  • 2021-11-08
  • 2022-01-13
  • 2021-08-10
相关资源
相似解决方案