怎样在asp.net下发邮件? http://blog.csdn.net/zhzuo/archive/2004/07/12/39459.aspx 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 System.Web.Mail.MailMessage mail=new MailMessage(); mail.To="[email protected]"; mail.From="[email protected]"; mail.Subject="注册表"; mail.Body="用户名"+this.TextBox1.Text+"密码"+this.TextBox2.Text; mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1; mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "用户名"); //set your username here mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "密码"); //set your password here SmtpMail.SmtpServer="localhost"; SmtpMail.Send(mail); Response.Write("<script language='javascript'>"); Response.Write("alert('邮件发送成功');"); Response.Write("</script>"); run(new Form1())????????????? 有关反射struct方法的一点问题! 举个小例子 初学者:查询输出问题! 求为表添加字段的sql语句!! C# 使用printDocument打印,怎样有规则的画带线的数据表格,而且还要在一定位置打印图片? 求助: C# 中的拖放操作 windowsform编译的exe程序,能否反编译呢? 请问谁做过C#中用DES加密的串用C代码的DES解密 C#中运算符重载 如何做到最底层代理?>?? 手动清除对象?
mail.To="[email protected]";
mail.From="[email protected]";
mail.Subject="注册表";
mail.Body="用户名"+this.TextBox1.Text+"密码"+this.TextBox2.Text;
mail.Fields["http://schemas.microsoft.com/cdo/configuration/smtpauthenticate"] = 1;
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "用户名"); //set your username here
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "密码"); //set your password here
SmtpMail.SmtpServer="localhost";
SmtpMail.Send(mail);
Response.Write("<script language='javascript'>");
Response.Write("alert('邮件发送成功');");
Response.Write("</script>");