private bool SendEmail(Email email, EmailCombinationEnum Combination) { // Epi.Web.Enter.Common.Email.Email Email = new Web.Common.Email.Email(); switch (Combination) { case EmailCombinationEnum.ResetPassword: email.Subject = "Your Epi Info Cloud Data Capture Password"; email.Body = string.Format("You recently accessed our Forgot Password service for Epi Info™ Cloud Data Capture. \n \n Your new temporary password is: {0}\n \n If you have not accessed password help, please contact the administrator. \n \nLog in with your temporary password. You will then be asked to create a new password.", email.Password); break; case EmailCombinationEnum.PasswordChanged: email.Subject = "Your Epi Info Cloud Data Capture Password has been updated"; email.Body = " You recently updated your password for Epi Info™ Cloud Data Capture. \n \n If you have not accessed password help, please contact the administrator for you organization. \n \n "; break; case EmailCombinationEnum.UpdateUserInfo: email.Subject = "Your Epi Info Cloud Data Capture Account info has been updated"; email.Body = " You account info has been updated in Epi Info™ Cloud Data Capture system."; break; case EmailCombinationEnum.InsertUser: email.Subject = "An Epi Info Cloud Data Capture account has been created for your organization."; break; default: break; } //email.Body = email.Body.ToString() + " \n \nPlease click the link below to launch Epi Cloud Data Capture. \n" + ConfigurationManager.AppSettings["BaseURL"] + "\nThank you."; email.From = ConfigurationManager.AppSettings["EMAIL_FROM"]; return(Epi.Web.Enter.Common.Email.EmailHandler.SendMessage(email)); }
private bool SendEmail(Email email, EmailCombinationEnum Combination) { switch (Combination) { case EmailCombinationEnum.InsertOrganization: email.Subject = "An Epi Info Cloud Data Capture account has been created for your organization."; break; default: break; } email.Body = email.Body.ToString(); //+" \n \nPlease click the link below to launch Epi Cloud Data Capture. \n" + AppSettings.GetStringValue(AppSettings.Key.BaseURL) + "\n\nThank you."; //email.Body.ToString() + " \n \n" + AppSettings.GetStringValue(AppSettings.Key.BaseURL); email.From = EmailAppSettings.GetStringValue(EmailAppSettings.Key.EmailFrom); return(Epi.Web.Enter.Common.Email.EmailHandler.SendMessage(email)); }
private bool SendEmail(Email email, EmailCombinationEnum combination) { // Epi.Common.Email.Email Email = new Web.Common.Email.Email(); switch (combination) { case EmailCombinationEnum.ResetPassword: //email.Subject = "Your Epi Info Cloud Enter Password"; //email.Body = string.Format("You recently accessed our Forgot Password service for Epi Info™ Cloud Enter. \n \n Your new temporary password is: {0}\n \n If you have not accessed password help, please contact the administrator. \n \nLog in with your temporary password. You will then be asked to create a new password.", email.Password); email.Subject = ResourceProvider.GetResourceString(ResourceNamespaces.EmailMessages, EmailResourceKeys.ResetPassword_Subject); email.Body = string.Format(ResourceProvider.GetResourceString(ResourceNamespaces.EmailMessages, EmailResourceKeys.ResetPassword_Body), email.Password); break; case EmailCombinationEnum.PasswordChanged: //email.Subject = "Your Epi Info Cloud Enter Password has been updated"; //email.Body = "You recently updated your password for Epi Info™ Cloud Enter. \n \n If you have not accessed password help, please contact the administrator for you organization. \n \n "; email.Subject = ResourceProvider.GetResourceString(ResourceNamespaces.EmailMessages, EmailResourceKeys.PasswordChanged_Subject); email.Body = ResourceProvider.GetResourceString(ResourceNamespaces.EmailMessages, EmailResourceKeys.PasswordChanged_Body); break; case EmailCombinationEnum.UpdateUserInfo: //email.Subject = "Your Epi Info Cloud Enter Account info has been updated"; //email.Body = " You account info has been updated in Epi Info™ Cloud Enter system."; email.Subject = ResourceProvider.GetResourceString(ResourceNamespaces.EmailMessages, EmailResourceKeys.UpdateUserInfo_Subject); email.Body = ResourceProvider.GetResourceString(ResourceNamespaces.EmailMessages, EmailResourceKeys.UpdateUserInfo_Body); break; case EmailCombinationEnum.InsertUser: //email.Subject = "An Epi Info Cloud Enter account has been created for your organization."; email.Subject = ResourceProvider.GetResourceString(ResourceNamespaces.EmailMessages, EmailResourceKeys.InsertUser_Subject); break; default: break; } //email.Body = email.Body.ToString() + " \n \nPlease click the link below to launch Epi Cloud Enter. \n" + AppSettings.GetStringValue(AppSettings.Key.BaseURL) + "\nThank you."; email.From = EmailAppSettings.GetStringValue(EmailAppSettings.Key.EmailUserName); return(EmailHandler.SendMessage(email)); }