Exemple #1
0
        public ActionResult md5(string txtkey)
        {
            ViewBag.txt    = txtkey;
            ViewBag.md5_16 = MD5Helper.MD5_16(txtkey);
            ViewBag.md5_32 = MD5Helper.MD5_32(txtkey);

            string des = DESHelper.DESEncrypt(txtkey, DESHelper.GetKey());

            ViewBag.des_E = des;
            ViewBag.des_D = DESHelper.DESDecrypt(des, DESHelper.GetKey());

            //LoginLog one = new LoginLog();
            //one.belong_to_company = "ecobio";
            //one.login_time = DateTime.Now;
            //one.login_user_alias = txtkey;
            //string xml = XmlSerializerHelper.SaveXmlFromObj<LoginLog>(one);


            string mdc = Image64Base.GetImageStr("d:\\a.jpg");

            ViewBag.xml = mdc;
            return(View());
        }
Exemple #2
0
        public ContentResult sendmail(string email, string title, string content)
        {
            string MessageTo      = email;                                                //收件人邮箱地址
            string MessageSubject = title;                                                //邮件主题
            string MessageBody    = content + new Random().Next(1000, 999999).ToString(); //邮件内容
            //bool c = ecoBio.Wms.Common.MailHelper.Send(MessageTo, MessageSubject, MessageBody);
            bool       c    = true;
            MailHelper mh   = new MailHelper();
            var        img  = Image64Base.GetImageStr("d:\\b.jpg");
            var        html = "<html><head><title>title</title></head><body>这是内容<hr><br><img src=\"data:image/png;base64," + img + "\" /><br><img src=\"http://www.ecobiotech.com.cn/images/logo.gif\" /></body></html>";

            mh.Mail("*****@*****.**", "*****@*****.**", html, "title", "doumiao@ytk");
            //mh.Mail("*****@*****.**", "*****@*****.**", "<html><head><title>title</title></head><body>这是内容<hr><br><img src=\"data:image/png;base64," + img + "\" /></body></html>", "title", "doumiao@ytk");
            mh.Attachments("~\\Content\\my_pdf\\7459.pdf");
            string m = "成功";

            try
            {
                mh.Send();
            }
            catch (Exception ex)
            { m = ex.Message; }
            return(Content(m));
        }