用户注册成功后发送邮件时怎么自定义邮件模板发送给用户自己注册的信息??

解决方案 »

  1.   

    自动发邮件Button那里加 
      semail se = new semail();
    se.SendOneEmail(strEmail, strEmailtitle, strItem);
    就ok了
      

  2.   

    通过SMTP或jmail发送邮件,格式为html 
    点击链接获取参数实现验证 
    Message.BodyFormat = System.Web.Mail.MailFormat.Html; 
    jmail.Message j = new jmail.Message(); 
    j.ContentType = "text/html"; 
    public void MailSend(string MailFrom,string MailTo,string MailPwd,string Mailtitle,string MailCon) 
            { 
                MailMessage MyMail = new MailMessage(); 
                MyMail.From = new MailAddress("", ""); 
                MyMail.To.Add(new MailAddress("")); 
                MyMail.Subject = Mailtitle; 
                MyMail.Body = MailCon; 
                MyMail.IsBodyHtml = false; 
                SmtpClient smtpclient = new SmtpClient(); 
                smtpclient.DeliveryMethod = SmtpDeliveryMethod.Network; 
                smtpclient.Host = ""; 
                smtpclient.Credentials = new System.Net.NetworkCredential(MailFrom, MailPwd); 
                smtpclient.Send(MyMail); 
            } 
    jmail.Message Jmail = new jmail.Message(); 
                DateTime t = DateTime.Now; 
                String Subject = ""; 
                String body = ""; 
                String FromEmail = ""; 
                String ToEmail = ""; 
                Jmail.Charset = "GB2312"; 
                Jmail.ContentType = "text/html"; 
                Jmail.AddRecipient(ToEmail, "", ""); 
                Jmail.From = FromEmail; 
                Jmail.MailServerUserName = ""; 
                Jmail.MailServerPassWord = ""; 
                Jmail.Subject = Subject; 
              Jmail.ContentType="text/html"; 
                Jmail.Body = body + t.ToString(); 
                Jmail.Send("", false); 
                Jmail.Close(); 
      

  3.   

    我知道从那里去
    但是就是不知道怎么创建模板用XML?
    不知道怎么弄
      

  4.   

      string strSql = "select * from emailitem where priKey=0";//代补充
                        db d = new db();
                        DataTable dt = d.getDT(strSql);
                        if (dt.Rows.Count > 0)
                        {
                            string strItem = dt.Rows[0]["item"].ToString();
                            string strEmailtitle = dt.Rows[0]["name"].ToString();
                            strItem = strItem.Replace("#name#", strName);
                            strItem = strItem.Replace("#email#", strEmail);
                            strItem = strItem.Replace("#password#", this.txtPwd2.Value.Trim());
                            semail se = new semail();
                            se.SendOneEmail(strEmail, strEmailtitle, strItem);                    }
      

  5.   

    从数据库去模板内容 替换信息 发送email  明白吧!