你上面哪个写在类文件里,在test.aspx里调用它
string mailto = "kaka@
string mailSubject = "会员密码";
string mailBody = "正文+数据库里的密码";
string mailFrom = ConfigurationManager.AppSettings["SendMail"];
if(page.MySendMail(mailto, mailSubject, mailBody, mailFrom))
{
Response.Write("<script language='javascript'> alert('发送成功!');</script>");
}
else
{
Response.Write("<script language='javascript'> alert('发送失败!');</script>");
}
这样行不?我就是这样用的,你试试吧
[[it] 本帖最后由 青格儿 于 2008-6-18 13:51 编辑 [/it]]