Exemple #1
0
        public ActionResult Details()
        {
            var             userId = User.Identity.GetUserId();
            ApplicationUser user   = db.Users.Where(d => d.Id == userId).First();

            Hidden hide = new Hidden();

            if (ModelState.IsValid)
            {
                string userEmail = user.Email;
                string linkName  = "REPLY";
                string text      = "\n\n" + userEmail.ToString() + " \n\nwishes to obtain your contact information. Please click on the REPLY link above to accept or deny this request";
                string email     = hide.Email;
                string subject   = "Request Information";
                string link      = "<html><body><a href='http://localhost:65515/Reply\'>" + linkName + "</a></body></html>";


                link += text;

                MailGun.SendSimpleMessage(email, subject, link);

                return(RedirectToAction("Index"));
            }

            return(View());
        }
Exemple #2
0
        public ActionResult Deny()
        {
            string email   = hide.Email;
            string subject = "Request Denied";
            string link    = "I'm sorry your request was denied";

            MailGun.SendSimpleMessage(email, subject, link);

            return(View());
        }
Exemple #3
0
        public ActionResult Index(string parentEmail, string message)
        {
            string email   = hide.Email;
            string subject = "Tutor Update";
            string link    = message;


            MailGun.SendSimpleMessage(email, subject, link);

            return(View());
        }
        public async Task <ActionResult> Details(string trackingNumber)
        {
            if (ModelState.IsValid)
            {
                string guestEmail = hide.RetrieveEmail();
                string text2      = trackingNumber;

                MailGun.SendSimpleMessage(guestEmail, text2);

                return(RedirectToAction("Index"));
            }

            return(View());
        }
Exemple #5
0
        public ActionResult Accept()
        {
            string email   = hide.Email;
            string subject = "Request Accepted";
            //string linkName = "Click me for GOOGLE";
            //string tutorEmail = profile.ApplicationUser.Email;
            //string tutorFirstName = profile.ProfileFirstName;
            //string tutorLastName = profile.ProfileLastName;
            //string tutorPhoneNumber = profile.ProfilePhoneNumber;
            string tutorEmail       = "*****@*****.**";
            string tutorFirstName   = "New";
            string tutorLastName    = "TutorA";
            string tutorPhoneNumber = "123-456-7890";
            string link             = "I have accepted your request here is my contact information : " + tutorEmail + " " + tutorPhoneNumber + " " + tutorFirstName + " " + tutorLastName;

            MailGun.SendSimpleMessage(email, subject, link);


            return(View());
        }
Exemple #6
0
        public ActionResult Index(string accept, bool deny)
        {
            if (ModelState.IsValid)
            {
                string acceptButton = "accept";
                string denyButton   = "deny";

                if (acceptButton == "accept")
                {
                    string email   = hide.Email;
                    string subject = "Request Accepted";
                    //string linkName = "Click me for GOOGLE";
                    //string tutorEmail = profile.ApplicationUser.Email;
                    //string tutorFirstName = profile.ProfileFirstName;
                    //string tutorLastName = profile.ProfileLastName;
                    //string tutorPhoneNumber = profile.ProfilePhoneNumber;
                    string tutorEmail       = "*****@*****.**";
                    string tutorFirstName   = "New";
                    string tutorLastName    = "TutorA";
                    string tutorPhoneNumber = "123-456-7890";
                    string link             = "I have accepted your request here is my contact information : " + tutorEmail + " " + tutorPhoneNumber + " " + tutorFirstName + " " + tutorLastName;

                    MailGun.SendSimpleMessage(email, subject, link);
                    return(RedirectToAction("Index"));
                }

                if (deny)
                {
                    string email    = hide.Email;
                    string subject  = "Request Denied";
                    string linkName = "Sorry you have been denied by the tutor.";
                    string link     = "<html><body><a href='http://localhost:65515/List\'>" + linkName + "</a></body></html>";

                    MailGun.SendSimpleMessage(email, subject, link);
                    return(RedirectToAction("Index"));
                }
            }

            return(View());
        }