Example #1
0
        public void TestEmail()
        {
            PFEmail email   = null;
            string  subject = null;
            string  body    = null;



            //var message = JsonConvert.DeserializeObject<List<string>>(PFDataHelper.ReadLocalTxt("mailFujianJson.txt"));
            //email = new PFEmail(message);
            //body = email.Body;
            ////return;
            //Assert.IsTrue(body == "各们领导、同事:\r\n\r\n       附件为油葱架构文档V1.5版,请查收,谢谢\r\n\r\n \r\n\r\n \r\n\r\n陈辉\r\n\r\n");

            List <KeyValuePair <string, KeyValuePair <string, string> > > fileNames = new List <KeyValuePair <string, KeyValuePair <string, string> > > {
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "126Email.txt", new KeyValuePair <string, string>(
                        "PFEmailMq_producer_from126Mail_会员资料表",
                        "2019.01月结数据备份情况:\n\naaa\nbbb\n\n")),
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "aliyunEmail.txt", new KeyValuePair <string, string>(
                        "[SPAM]PFEmailMq_producer_fromSellGirl_会员资料表",
                        "\n<p>2019.01月结数据备份情况:<p>\n<ol>\n<li>aaa</li>\n<li>bbb</li>\n</ol>")),
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "perfect99Email.txt", new KeyValuePair <string, string>(
                        "PFEmailMq_producer_会员资料表",
                        "\r\n<p>2019.01月结数据备份情况:<p>\r\n<ol>\r\n<li>aaa</li>\r\n<li>bbb</li>\r\n</ol>\r\n")),
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "perfect99Email_含附件.txt", new KeyValuePair <string, string>(
                        "油葱架构文档V1.5版",
                        "各们领导、同事:\r\n\r\n       附件为油葱架构文档V1.5版,请查收,谢谢\r\n\r\n \r\n\r\n \r\n\r\n陈辉\r\n\r\n")),
                #region qqEmail
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "qqEmail.txt", new KeyValuePair <string, string>(
                        "PFEmailMq_producer_fromQQMail_会员资料表",
                        "2019.01月结数据备份情况:\r\n\r\n \r\n \r\naaa\r\n \r\nbbb")),
                #endregion qqEmail
                #region perfect99Email2
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "perfect99Email2.txt", new KeyValuePair <string, string>(
                        "转发: Fw: 请示",
                        @"



[email protected]
 
发件人: 完美(中国)有限公司 信息中心
发送时间: 2020-04-13 16:15
收件人: 王现伟
抄送: 余凤瑜
主题: Fw: 请示
王现伟,您好! 
 
  
 
 
= = = = = = 下面是转发邮件 = = = = = = =

原邮件发件人名字:胡文祥
原邮件发件人地址:[email protected]
原邮件收件人名字:王天庆总监; 李观棉
原邮件收件人地址:[email protected]; [email protected]
原邮件抄送人名字:
原邮件抄送人地址:

信息中心,您好!
我部2020年2月19日已取消购买宜悦空气净化器优惠购(AP60025)获得800元奖励的活动。后因服务中心库存较多,经过请示领导特将服务中心后台报单时间调整至3月31日。请继续提取空机(AP60025)2月及3月的实际销售名单给到财务以发放相应补贴:

请同步发一份销售名单给到此邮箱号([email protected])谢谢!    附:补报返现补贴的请示


胡文祥(推广专员)
市场中心 -策划部 
TEL:0760-88701828-88225/13924995602
E-Mail :[email protected]

完美(中国)有限公司  Perfect (China) Co., Ltd.
地址:广东省中山市石岐区东明北路(民营科技园),邮编:528402
Add :Dongming North Road, Shiqi District, Zhongshan
City, Guangdong Province, PRC (528400


= = = = = = = = = = = = = = = = = = = = 
        致
礼! 
                          完美(中国)有限公司 信息中心
                          [email protected]
                          2020-04-13
              
")),
                #endregion perfect99Email2

                #region perfect99Email3
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "perfect99Email3.txt", new KeyValuePair <string, string>(
                        "Fw: 关联关系申报与处理规定签订事宜Message-ID: <*****@*****.**>Organization: =?gb2312?B?zerDwKOo1tC5+qOp09DP3rmry74=?=X-mailer: Foxmail 6, 15, 201, 20 [cn]",
                        @"陈超,您好! 

  


= = = = = = 下面是转发邮件 = = = = = = =

原邮件发件人名字:人力资源中心
原邮件发件人地址:[email protected]

原邮件收件人名字:财务中心; 采购中心; 法务外事中心; 供应商改造项目组; 基建办; 集团战略法务部; 监察中心; 健康公司工作小组; 企业门户项目组; 人力资源中心; 市场中心; 完美大学; 信息中心; 研发中心; 业务中心; 制造中心; 总裁办; 董事长助理徐奕新高级经理; 董事长秘书陈嘉丽; 许生秘书许丽萍; 董事会办公室江晓君; 董事长助理秘书-柯冬燕; 董事长秘书张子卉; 副董事长办-赖丽霞; 副董事长秘书-黄学军; 常务副总裁秘书黄绮柔; 总裁办黄思苑; 分子机构管理室; 扬州人力资源部
原邮件收件人地址:[email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]; [email protected]
原邮件抄送人名字:
原邮件抄送人地址:

各中心/部门:
     您好!
     为了进一步完善个人信息申报体系,有效管控公司与个人的利益冲突,公司制定了《关联关系申报与处理规定》及相应申报表,现请各位员工按以下要求完成相关申报:
   
      一、申报对象:文员级及以上级别员工(名单单独发各中心秘书)。
   
     二、提交要求:
     A、总部、完美广东员工需在4月16日下午16:00前,将《关联关系申报与处理规定》、《关联关系申报表》签字版原件以中心为单位提交至人力资源中心王成 
瑶处(IP:88390)。
     B、分公司员工需在4月16日下午16:00前将签字版原件寄至人力资源中心黄燕婵收(请勿与其他资料混在一起)。
     C、扬州完美人员由扬州完美人力资源部负责收集汇总与存档,其中经理级及以上员工的《关联关系申报与处理规定》、《关联关系申报表》扫描件,由扬州人力资源部扫描后发至:[email protected]。
   
     三、填写要求:
     A、申报内容可以打印,必须按“申报要求”将相关内容填写完整。
     B、规定签名处及申报表的签名处必须亲笔签名,且正楷字清晰签署。
     C、规定与申报表可双面打印,两面均需按要求签名。


    以上请知悉配合,如有疑问,请与谭富豪(88389)/王成瑶(88390)联系。谢谢!

2020-04-13



祝工作顺利!

       致

  礼!
 
  人力资源中心  HR CENTER
 Tel:88701828-88392 方玉英
 Fax:88701828-88370





= = = = = = = = = = = = = = = = = = = = 
        致
礼! 
                          完美(中国)有限公司 信息中心
                          [email protected]
                          2020-04-13
              
")),
                #endregion perfect99Email3

                #region perfect99Email4
                new KeyValuePair <string, KeyValuePair <string, string> >(
                    "perfect99Email4.txt", new KeyValuePair <string, string>(
                        "新电子商务系统权限申请_0603015",
                        @"<p>新电子商务系统权限申请</p>
<p>申请人工号:0603015</p>
")) //,
                #endregion perfect99Email4
            };

            //fileNames = fileNames.Where(a => a.Key == "perfect99Email4.txt").ToList();
            foreach (var i in fileNames)
            {
                //email = new PFEmail(PFDataHelper.ReadLocalTxt(i).Split(new char[] { '\r', '\n' }));
                try
                {
                    email   = new PFEmail(PFDataHelper.ReadLocalTxt(i.Key).Split(new string[] { "\r\n" }, StringSplitOptions.None));
                    subject = email.Subject;
                    //PFDataHelper.WriteLog(subject);
                    body = email.Body;
                }
                catch (Exception e)
                {
                    throw new Exception(i.Key + e.ToString());
                }
                if (subject != i.Value.Key || body != i.Value.Value)
                {
                    throw new Exception(i.Key);
                }
                //Assert.IsTrue(body == i.Value);
            }

            var aa = "aa";
        }