邮件正文传参数的问题
C#
public static bool PostMail(string PostTOMail, string MailTitle, string Pwd)
{
string SmtpMailUser = "wt@kehonsoft.com"; //发件箱帐户
string SmtpMailPWD = "111111"; //该帐户对应的密码
string SmtpMailHost = "mail.kehonsoft.com"; //邮件服务器
string SBody = " 您已成功注册br /> " ;
SBody += " 请点击以下按钮完成激活。 <br /> " ;
SBody += " 链接: <a href= "'"http://www.ipexnet.cn/active.aspx?Email= " + PostTOMail ;
SBody += " &Pwd= " + Pwd + "'">http://www.ipexnet.cn/active.aspx?Regmail=" + PostTOMail ;
SBody += " &Pwd= " + Pwd + "</a><br />" ;
SBody += " 如有任何疑问,欢迎随时与我们联系,我们将竭诚为您服务!。 <br /> " ;
MailMessage MSG = new MailMessage();
MSG.From = new MailAddress(SmtpMailUser);
MSG.To.Add(PostTOMail);
MSG.Subject = MailTitle;
MSG.IsBodyHtml = true;
MSG.Body = SBody;
SmtpClient sc = new SmtpClient();
//sc.EnableSsl = true; //是否SSL加密
sc.Host = SmtpMailHost; //邮件服务器
sc.Port = 25; //smtp端口
sc.Credentials = new NetworkCredential(SmtpMailUser, SmtpMailPWD);
//邮件发送报告
try
{
sc.Send(MSG);
return true;
}
catch
{
return false;
}
这个正文里链接网址怎么取得参数啊. 偶执行的时候会报错咯
}
--------------------编程问答-------------------- 顶
补充:.NET技术 , ASP.NET