Beispiel #1
0
        // ------------ For New Template--------------------//
        public void StartMailSendingForNew()
        {
            Console.WriteLine("<------------------------------------------------->");
            Console.WriteLine("<---------Start SocioQueu Mail Sending ---------->");
            Console.WriteLine("<------------------------------------------------->");
            MandrillaccountRepository mandrillRepoNew   = new MandrillaccountRepository();
            MantaemailRepository      mantaemailrepoNew = new MantaemailRepository();
            List <Mandrillaccount>    allmandrillACCNew = mandrillRepoNew.getAllMandrillData();

            for (int i = 1; i < 110000; i += 10000)
            {
                List <Mantaemail> objemaillistNew = mantaemailrepoNew.getAllCompanyDataNew(i);
                Thread            SendInvitationMailForNew_thread = new Thread(() => SendInvitationMailForNew(objemaillistNew, allmandrillACCNew));
                SendInvitationMailForNew_thread.Start();
                //SendInvitationMailForNew(objemaillistNew, allmandrillACCNew);
            }
        }
Beispiel #2
0
        public void StartMailSending()
        {
            Console.WriteLine("<------------------------------------------------->");
            Console.WriteLine("<---------Start Invitation Mail Sending ---------->");
            Console.WriteLine("<------------------------------------------------->");

            MandrillaccountRepository mandrillRepo   = new MandrillaccountRepository();
            MantaemailRepository      mantaemailrepo = new MantaemailRepository();
            List <Mandrillaccount>    allmandrillACC = mandrillRepo.getAllMandrillData();

            for (int i = 1; i < 110000; i += 10000)
            {
                List <Mantaemail> objemaillist = mantaemailrepo.getAllCompanyData(i);
                Thread            SendInvitationMail_thread = new Thread(() => SendInvitationMail(objemaillist, allmandrillACC));
                SendInvitationMail_thread.Start();
                //SendInvitationMail(objemaillist, allmandrillACC);
            }
        }
Beispiel #3
0
 public void GetClicksForMandrillAccount()
 {
     try
     {
         MandrillaccountRepository mandrillRepo       = new MandrillaccountRepository();
         List <Mandrillaccount>    lstMandrillaccount = mandrillRepo.getAllMandrillData();
         foreach (Mandrillaccount item in lstMandrillaccount)
         {
             try
             {
                 string url             = clsGetRejectedEmail.GetUrlToGetClicks(item.Password);
                 string mandrillaccinfo = clsGetRejectedEmail.WebRequestForMandrill(url);
                 JArray JData           = JArray.Parse(mandrillaccinfo);
                 foreach (var mail_item in JData)
                 {
                     try
                     {
                         string email = mail_item["address"].ToString().Replace("\"", "");
                         if (email == item.UserName)
                         {
                             string sent   = mail_item["sent"].ToString();
                             string opens  = mail_item["opens"].ToString();
                             string clicks = mail_item["clicks"].ToString();
                             mandrillRepo.UpdateOpenandClicks(sent, opens, clicks, email);
                         }
                     }
                     catch (Exception ex)
                     {
                         Console.WriteLine(ex.StackTrace);
                     }
                 }
             }
             catch (Exception ex)
             {
                 Console.WriteLine(ex.StackTrace);
             }
         }
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.StackTrace);
     }
 }