示例#1
0
        public ActionResult Index()
        {
            var sendMail = MailerService.SendEmail("*****@*****.**", "subject", "hello world message");

            ViewBag.Title = "Home Page";

            var user  = Request.LogonUserIdentity.Name;
            var user2 = System.Web.HttpContext.Current.User.Identity.Name;

            return(View());
        }
示例#2
0
    protected void sendEmail()
    {
        LoginDetails loginDetails = User.Identity as LoginDetails;
        string       userId       = loginDetails.UserId;
        string       subject      = "Stationery Requistion by " + loginDetails.Name;
        List <Stationery_Catalogue> stationeryCatalogueList = (List <Stationery_Catalogue>)Session["Cart"];
        User   headUser = UserDAO.GetUserdOfDeptHead(Convert.ToInt32(userId));
        String body     = setEmailBody();

        MailerService.SendEmail(headUser.Email, headUser.Employee.Name, subject, body);
    }