public ActionResult Ragam()
        {
            using (TextReader tw = new StreamReader(Routes.WelcomeFile))
            {
                var mail = HtmlComposer.Link("Ragam Promotion Page(NITCAA)", "http://nitcalumni.com/home/ragam");

                mail += HtmlComposer.Div(" ");//("Ragam Offical Webiste", "http://www.ragam.org.in/2014/");
                mail += HtmlComposer.Link("Ragam Official Website", "http://www.ragam.org.in/2014/");
                mail += string.Format("<a href='http://nitcalumni.com/home/ragam'><img src={0} alt='Ragam-2004 Invitation'/></a>", Routes.ImageUrl("invi.jpg"));
                mail += HtmlComposer.Div(" ");//("Ragam Offical Webiste", "http://www.ragam.org.in/2014/");

                var users = _db.Users.Where(u => u.Email == "*****@*****.**" || u.Email == "*****@*****.**" || u.Email == "*****@*****.**").ToList();
                //var users = _db.Users.Where(u => u.AccountStatus != UserRegisterStatus.Suspended).ToList().Skip(6000).Take(1000).ToList();//.Where(u => u.Email == "*****@*****.**" || u.Email == "*****@*****.**" || u.Email == "*****@*****.**").ToList();
                var cnt    = 1;
                var maxCnt = users.Count;
                foreach (var user in users)
                {
                    MailSrv.SendMailAsync(user, mail, "Ragam'14 Invitation for NITC Alumni", (s) => { if (!s)
                                                                                                      {
                                                                                                          Debug.WriteLine(s);
                                                                                                      }
                                          });
                    Thread.Sleep(900);
                    Debug.WriteLine(cnt++ + "/" + maxCnt);
                }
                return(View("AutoWelcome", users.Count));
            }
        }
Example #2
0
 public ViewResult Index(CandidateSearchVm model, string output)
 {
     CurrentPage = PageTypes.Find;
     model.ApplyFilters(Request.Form);
     if (output == "mail")
     {
         var html = new HtmlComposer();
         foreach (var item in model.Filters.Skip(3).Take(2))
         {
             html.AppendRaw("<table border='1' style='text-align:left' cellpadding:'2'>");
             html.AppendRaw("<tr>");
             html.AppendRaw("<th  style='width:100px;'>" + item.Name + "</th><th style='width:100px;'>Count</th>");
             html.AppendRaw("</tr>");
             foreach (var fItem in item.FilterItems)
             {
                 html.AppendRaw("<tr>");
                 html.AppendDiv("<td>" + fItem.ValueText + "</td><td>" + fItem.Count + "</td>");
                 html.AppendRaw("</tr>");
             }
             html.AppendRaw("</table>");
             html.AppendBr();
         }
         ViewBag.Stat = html.Text;
         return(View("Mail"));
     }
     return(View(model));
 }
        public string GetDisgest()
        {
            var composer = new HtmlComposer();

            composer.AppendLinkHead(SenderName, Routes.MentorUrl(MentorShipId))
            .AppendDiv(Text.LetterLimited(80));
            return(composer.Text.ToString());
        }
Example #4
0
        public string GetDisgest()
        {
            var composer = new HtmlComposer();

            composer.AppendImg(Routes.ImageUrl("jobs.png"))
            .AppendLinkHead(Title, Routes.JobSearchUrl())
            .AppendDiv(Description.LetterLimited(120).Replace("\n", " "));
            return(new HtmlComposer().AppendClearDiv(composer.Text).Text.ToString());
        }
Example #5
0
        public string GetDisgest()
        {
            var composer = new HtmlComposer();

            composer.AppendImg(Routes.NewsThumbImg(AlumniNewsId))
            .AppendLinkHead(Title, Routes.PageUrl(AlumniNewsId, NewsType == Entities.NewsType.News ? PageTypes.News : PageTypes.AlumniStory))
            .AppendDiv(NewsType == Entities.NewsType.News ? News.LetterLimited(120).Replace("\n", " ") : SubTitle);
            return(new HtmlComposer().AppendClearDiv(composer.Text).Text.ToString());
        }
Example #6
0
        public string GetDisgest()
        {
            var composer = new HtmlComposer();

            composer.AppendImg(Routes.ImageUrl("msg.png"))
            .AppendLinkHead(SenderName, Routes.MessageUrl(MessageThreadId))
            .AppendDiv(Text.LetterLimited(80).Replace("\n", " "));
            return(composer.Text.ToString());
        }
Example #7
0
        public string GetDisgest()
        {
            var composer = new HtmlComposer();
            var comment  = Comments[0];

            composer.AppendImg(Routes.ImageUrl("discussion.png"))
            .AppendLinkHead(Title, Routes.DisucssionUrl(DiscussionId))
            .AppendDiv("by " + comment.SenderName, true)
            .AppendDiv(Content.LetterLimited(120).Replace("\n", " "));
            return(composer.Text.ToString());
        }
Example #8
0
        public string ReminderMail()
        {
            var date     = string.Format("Due Date : {0}", DueDate.ToString("ddd, dd MMM yyyy"));
            var composer = new HtmlComposer();

            composer.AppendDiv("This is gentle reminder for the task assigned to you.")
            .AppendHead("Task : " + Title)
            .AppendDiv(date)
            .AppendDiv("Click the below link for more details")
            .AppendLink(Routes.ActivityUrl(ActivityId), Routes.ActivityUrl(ActivityId));
            return(composer.Text.ToString());
        }
Example #9
0
        public string GetDisgest()
        {
            var istFrom  = FromDate.Add(TimeSpan.FromMinutes(330));
            var from     = string.Format("{0} {1} IST", FromDate.ToString("ddd, dd MMM yyyy"), FromDate.ToShortTimeString());
            var composer = new HtmlComposer();

            composer.AppendImg(Routes.ImageUrl("event_mail.jpg"))
            .AppendLinkHead(EventName, Routes.EventsUrl(EventId))
            .AppendDiv(Location.Replace("\n", " "))
            .AppendDiv(from);
            return(composer.Text.ToString());
        }