private void SendCongratulationsEmailToStudent(string email, string name)
        {
            EmailManager        emailManager = new EmailManager();
            EmailTemplateHelper eth          = new EmailTemplateHelper();
            string body = eth.GetTemplate("studentreg");

            body = body.Replace("{{name}}", name);
            emailManager.SendMail("*****@*****.**", "CareerThesaurus", email, "You're Registered -- W00t!", body);
        }
        private void SendCongratulationsEmailToAdmin(string email, string name)
        {
            EmailManager        emailManager = new EmailManager();
            EmailTemplateHelper eth          = new EmailTemplateHelper();
            string body = eth.GetTemplate("adminreg");

            body = body.Replace("{{name}}", name);
            emailManager.SendMail("*****@*****.**", "CareerThesaurus", email, "Your CareerThesaurus Account Registration", body);
        }
        private void SendResetPasswordEmail(string email, string password, string name)
        {
            EmailManager        emailManager = new EmailManager();
            EmailTemplateHelper eth          = new EmailTemplateHelper();
            string body = eth.GetTemplate("resetpassword");

            body = body.Replace("{{name}}", name);
            body = body.Replace("{{password}}", password);
            emailManager.SendMail("*****@*****.**", "CareerThesaurus", email, "Account Notification - Reset Password", body);
        }
        private void SendInviteEmail(string email, string name, string admin, string guid)
        {
            string              url          = "http://CareerThesaurus.com/SignUp/Counselor/" + guid;
            EmailManager        emailManager = new EmailManager();
            EmailTemplateHelper eth          = new EmailTemplateHelper();
            string              body         = eth.GetTemplate("counselorinvite");

            body = body.Replace("{{name}}", name);
            body = body.Replace("{{admin}}", admin);
            body = body.Replace("{{url}}", url);
            emailManager.SendMail("*****@*****.**", "CareerThesaurus", email, "You are Invited to Join CareerThesaurus", body);
        }
        private void sendSignupEmail(string name, string email)
        {
            // SimpleAES aes = new SimpleAES();
            EmailManager        emailManager = new EmailManager();
            EmailTemplateHelper eth          = new EmailTemplateHelper();
            //  string token = aes.EncryptToBase64String(email);
            //  string url = "http://www.CareerThesaurus.com/Careers/CareerReport/" + token;
            string body = eth.GetTemplate("signupthankyou");

            body = body.Replace("{{name}}", name);
            // body = body.Replace("{{url}}", url);
            emailManager.SendMail("*****@*****.**", "CareerThesaurus", email, "Thank you for signing up", body);
        }
Exemplo n.º 6
0
        private void SendVerificationEmail(string email, string name)
        {
            SimpleAES           aes          = new SimpleAES();
            string              token        = aes.EncryptToString(email.ToLower());
            string              url          = "http://CareerThesaurus.com/Account/ConfirmEmail/" + token;
            EmailManager        emailManager = new EmailManager();
            EmailTemplateHelper eth          = new EmailTemplateHelper();
            string              body         = eth.GetTemplate("confirmemail");

            body = body.Replace("{{name}}", name);
            body = body.Replace("{{url}}", url);
            emailManager.SendMail("*****@*****.**", "CareerThesaurus", email, "Account Notification - Confirm Email", body);
        }
        private void sendInterestResultEmail(string name, string email)
        {
            SimpleAES           aes          = new SimpleAES();
            EmailManager        emailManager = new EmailManager();
            EmailTemplateHelper eth          = new EmailTemplateHelper();
            string token = aes.EncryptToBase64String(email);
            string url   = "http://www.CareerThesaurus.com/Careers/InterestReport/" + token;
            string body  = eth.GetTemplate("interestresults");

            body = body.Replace("{{name}}", name);
            body = body.Replace("{{url}}", url);
            emailManager.SendMail("*****@*****.**", "CareerThesaurus", email, "Your Career Test Results", body);
        }
Exemplo n.º 8
0
 public ActionResult getParentResponses(Parent pParent)
 {
     try
     {
         ParentClient tableStorage = new ParentClient();
         tableStorage.Add(pParent);
         string emailTemplate = EmailTemplateHelper.GetTemplate("ParentEmail");
         string emailBody     = string.Format(emailTemplate, pParent.FirstName);
         EmailHelper.SendEmail(pParent.Email, "*****@*****.**", "Your Registration Follow up", emailBody, true);
         return(Content(JsonConvert.SerializeObject(new { }), "application/json"));
     }
     catch (Exception ex)
     {
         return(new HttpStatusCodeResult(HttpStatusCode.NotFound, ex.Message));
     }
 }
Exemplo n.º 9
0
        public async Task SendGridLeaveDeclinedAsync(string emailAdd, string subject, string message, string firstname, string template, string organisation, Leave leave)
        {
            string domain = "http://erp4sme.azurewebsites.net";

            EmailTemplateHelper EmailHelper = new EmailTemplateHelper();

            var body = EmailHelper.GetTemplate(template).Replace("#FirstName", firstname).Replace("#ResetLink", domain + message).Replace("#HostDomain", domain).Replace("#Organisation", organisation).Replace("#EmployeeFirstname", leave.EmployeeDetail.FirstName + " " + leave.EmployeeDetail.LastName).Replace("#LeaveTitle", leave.LeaveTitle).Replace("#StartDate", leave.StartDate.ToString("dd MMM, yyyy")).Replace("#EndDate", leave.EndDate.ToString("dd MMM, yyyy"));


            var client = new SendGridClient(apiKey);
            var msg    = new SendGridMessage()
            {
                From    = new EmailAddress("*****@*****.**", "ERP4SME"),
                Subject = "New Leave Declined on ERP4SME.",
                //PlainTextContent = "You have been registered on ERP4SME platform. Kindly use the link below to create your account.",
                HtmlContent = body
            };

            msg.AddTo(new EmailAddress(emailAdd, emailAdd));
            await client.SendEmailAsync(msg);

            //var response =
        }
Exemplo n.º 10
0
        async Task IEmailSender.SendGridEmailAsync(string emailAdd, string subject, string message, string organisation, string firstname, string template)
        {
            string domain = "http://erp4sme.azurewebsites.net";

            EmailTemplateHelper EmailHelper = new EmailTemplateHelper();

            var body = EmailHelper.GetTemplate(template).Replace("#FirstName", firstname).Replace("#ResetLink", message).Replace("#HostDomain", domain).Replace("#Organisation", organisation);

            //string

            var client = new SendGridClient(apiKey);
            var msg    = new SendGridMessage()
            {
                From    = new EmailAddress("*****@*****.**", "ERP4SME"),
                Subject = "Set Up Your Account on ERP4SME.",
                //PlainTextContent = "You have been registered on ERP4SME platform. Kindly use the link below to create your account.",
                HtmlContent = body
            };

            msg.AddTo(new EmailAddress(emailAdd, emailAdd));
            await client.SendEmailAsync(msg);

            //var response =
        }
Exemplo n.º 11
0
        //Email Templates for Account Module,

        public async Task SendGridInvoicesAsync(string emailAdd, string subject, string message, string firstname, string template, string organisation, InvoiceRecord invoiceRecord, Customer customer)
        {
            string domain = "http://erp4sme.azurewebsites.net";

            EmailTemplateHelper EmailHelper = new EmailTemplateHelper();

            var body = EmailHelper.GetTemplate(template).Replace("#FirstName", firstname).Replace("#HostDomain", domain).Replace("#Organisation", organisation).Replace("#CustomersFirstname", customer.CustomerName).Replace("#DueDate", invoiceRecord.DueDate.ToString("dd MMM, yyyy")).Replace("#Amount", invoiceRecord.Total.ToString());

            //string apiKey

            var client = new SendGridClient(apiKey);
            var msg    = new SendGridMessage()
            {
                From    = new EmailAddress("*****@*****.**", "ERP4SME"),
                Subject = "New Invoice on ERP4SME.",
                //PlainTextContent = "You have been registered on ERP4SME platform. Kindly use the link below to create your account.",
                HtmlContent = body
            };

            msg.AddTo(new EmailAddress(emailAdd, emailAdd));
            await client.SendEmailAsync(msg);

            //var response =
        }
        async Task IEmailSender.SendGridEmailConfrimationAsync(string emailAdd, string subject, string message, string firstname)
        {
            string domain = "https://wbizmanager.azurewebsites.net";

            EmailTemplateHelper EmailHelper = new EmailTemplateHelper();

            var body = EmailHelper.GetTemplate("accoutConfirmation").Replace("#FirstName", firstname).Replace("#ResetLink", message).Replace("#HostDomain", domain);

            //string

            var client = new SendGridClient(apiKey);
            var msg    = new SendGridMessage()
            {
                From    = new EmailAddress("*****@*****.**", "wBizManager"),
                Subject = "Account Confirmationon wBizManager.",
                //PlainTextContent = "You have are registered on ERP4SME platform. Kindly confrim your account.",
                HtmlContent = body
            };

            msg.AddTo(new EmailAddress(emailAdd, emailAdd));
            await client.SendEmailAsync(msg);

            //var response =
        }