Ejemplo n.º 1
0
        private string SendEmail(int memberID, string password)
        {
            member member = db.members.Find(memberID);
            user   user   = MembershipService.GetUserByID(memberID);

            if (user.EmailType == "Email")
            {
                EmailController EmailServer = new EmailController(ConstantRepository);
                EmailServer.Index(member.FirstNameTitle, member.LastName, user.Email, password);
            }
            else
            {
                EmailController EmailServer = new EmailController(ConstantRepository);
                EmailServer.IndexText(member.FirstNameTitle, member.LastName, user.Email, password);
            }


            TempData["Message2"] = string.Format("{0} record edited successfully.", member.FirstName);
            return("Email sent!");
        }
Ejemplo n.º 2
0
        public string SendRentalEmail(DateTime EventDate, string FullName, string PhoneNumber, string EmaiAddress, string BusinessName, string DescribeEvent)
        {
            try
            {
                RentProperty RentalRequest = new RentProperty();
                RentalRequest.EventDate     = EventDate;
                RentalRequest.FullName      = FullName;
                RentalRequest.PhnoeNumber   = PhoneNumber;
                RentalRequest.EmailAddress  = EmaiAddress;
                RentalRequest.BusinessName  = BusinessName;
                RentalRequest.DescribeEvent = DescribeEvent;

                EmailController EmailServer = new EmailController(ConstantRepository);
                EmailServer.RentalEmail(RentalRequest);
                return("Email sent successfully");
            }
            catch (Exception ex)
            {
                return("Error sending email");
            }
        }
Ejemplo n.º 3
0
        public string ContactUs(string Name, string Email, string Phone, string Subject, string comment, bool ContactMe)
        {
            try
            {
                ContactUs ContactUs = new ContactUs();
                ContactUs.Comment      = comment;
                ContactUs.ContactMe    = ContactMe;
                ContactUs.EmailAddress = Email;
                ContactUs.FullName     = Name;
                ContactUs.PhoneNumber  = Phone;
                ContactUs.Subject      = Subject;

                EmailController EmailServer = new EmailController(ConstantRepository);
                EmailServer.ContactUs(ContactUs);
                //TempData["ContactUsEmailReturnMsg"] = "Email sent successfully";
                return("Email sent successfully");
            }
            catch (Exception ex)
            {
                // TempData["ContactUsEmailReturnMsg"] = "Error sending email";
                return("Error sending email");
            }
        }