111

.NET网站开发技术总结

 
 

.NET网站开发技术总结

订单

 

 

注意:软通货覆盖是否格式该发是f该是
1.  public static void SendMail(string content, string url)
2.
{
3. JH_Agent jhAgent = new JH_Agent();
4. DataSet ds = jhAgent.GetList("JH4='" + url + "'");
5. if (ds.Tables[0].Rows[0]["JH18"].ToString().Trim() != "")
6. {
7. jmail.Message jmessage = new jmail.MessageClass();
8. jmessage.Charset = "GB2312";
9. jmessage.From = "notice@joinhead.com"; //发信地址
10. jmessage.FromName = "notice@joinhead.com"; //发信人
11. jmessage.ReplyTo = "notice@joinhead.com"; //回复地址
12. jmessage.Subject = " 微信公众帐号审核提醒"; //邮件标题
13. jmessage.AddRecipient(ds.Tables[0].Rows[0]["JH18"].ToString().Trim(), "", ""); //为收信人地址,后面两个参数可为空!
14. //AddRecipient(emailAddress,recipientName,PGPKey)
15. //给邮件添加一个收件人。RecipientName和PGPKey是可选项,RecipientName为收件人姓名,PGPKey给邮件加密。
16. jmessage.HTMLBody = content; //信件内容
17. jmessage.MailServerUserName = "notice@joinhead.com"; //为发信邮箱登陆的用户名
18. jmessage.MailServerPassWord = "Ntc8199"; //为发信邮箱登陆的密码
19. jmessage.Send("smtp.joinhead.com", false); //IP为邮件服务器
20. //Response.Write("email sent successfully!");
21. jmessage.Close();
22. }
23. }
 public void InitWebParameter(string key)
        {
            JH_WebParameter jhWebParameter = new JH_WebParameter();
            Model.JH_WebParameter mjhWebParameter = new Model.JH_WebParameter();
            DataSet dsInfo = jhWebParameter.GetList("JH4='" + key + "'");
            if (dsInfo.Tables[0].Rows.Count == 0)
            {
                mjhWebParameter.JH6 = 0;
                mjhWebParameter.AddTime = DateTime.Now;
                jhWebParameter.Add(mjhWebParameter);
            }
        }

  

 
posted @ 2016-02-27 11:21  lampon  阅读(182)  评论(0编辑  收藏  举报