Beispiel #1
0
        private static string CreateResourceForDenaialEmailBody(string fullName)
        {
            //HTML Message
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST  Resource denial DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.AppendFormat("Dear {0},", fullName.ToCamelCasing());
            sb.AddNewHtmlLines(2);
            sb.Append("The resource you uploaded for the SHIP Resource Library at portal.shiptacenter.org was not approved for publication by a SHIP director or SHIP administrator.");

            sb.AddNewHtmlLines(3);
            sb.Append("If you have questions about this decision, please contact a SHIP director or administrator from your SHIP program.");
            sb.AddNewHtmlLines(3);
            sb.Append("Sincerely,");
            sb.AddNewHtmlLines(2);
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.EmailOfResourceCenter);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #2
0
        private string CreateEmailBodyForPasswordChangeConfirmation()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST Confirm Your Password from DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.Append("Hello,");
            sb.AddNewHtmlLines(3);
            sb.Append("This email is to confirm that your password to shipnpr.shiptalk.org account has been changed successfully.");
            sb.AddNewHtmlLines(2);
            sb.Append("If you did not change your password, please contact SHIP NPR Help Desk immediately.");
            sb.AddNewHtmlLines(3);
            sb.Append("Thank you,");
            sb.AddNewHtmlLine();
            sb.Append("SHIP NPR Help Desk");
            sb.AddNewHtmlLine();
            sb.Append("<a href='https://shipnpr.shiptalk.org'>https://shipnpr.shiptalk.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #3
0
        private static string CreateEmailBodyForResourceNotification(string firstName, string lastName)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST Resource request for approval------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);
            }
            sb.AppendFormat("A resource from {0} {1} at your SHIP has been uploaded for possible inclusion in the SHIP Resource Library at portal.shiptacenter.org.", firstName.ToCamelCasing(), lastName.ToCamelCasing());
            sb.AddNewHtmlLine();
            sb.Append("As a reminder, uploads from staff-level users of the SHIP Resource Library do not go live until they are approved by you or another SHIP administrator in your state, territory, or commonwealth.");

            sb.AddNewHtmlLines(3);


            sb.Append("Please visit your administrator dashboard at portal.shiptacenter.org to review and approve (or delete) the resource. If you do not find this resource on your dashboard when you visit, it means another SHIP administrator from your program had already reviewed and approved or rejected the resource.");
            sb.AddNewHtmlLines(2);



            //Need to add User Descriptor and Regional Access profile by verifying what role or agency was selected.

            sb.Append("Sincerely,");
            sb.AddNewHtmlLines(2);
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.EmailOfResourceCenter);
            sb.AddNewHtmlLines(5);


            return(sb.ToString());
        }
Beispiel #4
0
        private static string CreateResourceForApprovalEmailBody(string fullName)
        {
            //HTML Message
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST  Resource approval DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.AppendFormat("Dear {0},", fullName.ToCamelCasing());
            sb.AddNewHtmlLines(2);
            sb.Append("The resource you uploaded for the SHIP Resource Library at portal.shiptacenter.org has now been approved for publication by a SHIP director or SHIP administrator.");

            sb.AddNewHtmlLines(3);
            sb.Append("To view your resource, log in at portal.shiptacenter.org.");
            sb.AddNewHtmlLines(3);
            sb.Append("Sincerely,");
            sb.AddNewHtmlLines(2);
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.EmailOfResourceCenter);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #5
0
        private string CreateEmailBodyForPasswordChangeConfirmation()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST  Your Password Changed DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.Append("Hello,");
            sb.AddNewHtmlLines(2);
            sb.Append("This email is to confirm that your password at shiptacenter.org has been changed successfully.");
            sb.AddNewHtmlLines(2);
            sb.Append("If you did not change the password, please contact SHIP National Technical Assistance Center immediately.");
            sb.AddNewHtmlLines(3);
            sb.Append("Thank you,");
            sb.AddNewHtmlLine();
            sb.Append("SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append("<a href='portal.shiptacenter.org'>portal.shiptacenter.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #6
0
        private static string CreateResourceWaitingForApprovalEmailBody(string firstName)
        {
            //HTML Message
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST  Resource Creation DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.AppendFormat("Dear {0},", firstName.ToCamelCasing());
            sb.AddNewHtmlLines(2);
            sb.Append("Your resource has been uploaded and is awaiting approval from your SHIP director or SHIP administrator.");
            sb.AddNewHtmlLines(3);

            sb.AddNewHtmlLines(3);
            sb.Append(" You will receive an email from [email protected] after it has been reviewed, notifying you of the status.");
            sb.AddNewHtmlLines(3);
            sb.Append("Sincerely,");
            sb.AddNewHtmlLines(2);
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.EmailOfResourceCenter);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #7
0
        private static string CreateEmailBodyForSendDisapproveEmail(string userName)
        {
            //Dear (first name),
            //Your request to become an approved user of the “For SHIPs” area of portal.shiptacenter.org has been denied by the director of your State Health Insurance Assistance Program (SHIP). As a reminder, the “For SHIPs” area of portal.shiptacenter.org is intended for representatives who do SHIP work. To visit the area of our website that is available to the general public, click here.
            //Sincerely,
            //The SHIP National Technical Assistance Center
            //portal.shiptacenter.org
            //877-839-2675

            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.AppendFormat("Dear {0},", userName);
            sb.AddNewHtmlLines(2);
            sb.Append("Your request for an account to access the SHIP only area of portal.shiptacenter.org was denied by your SHIP administrator. The login area of portal.shiptacenter.org is intended only for State health Insurance Assistance Program (SHIP) representatives. If you are a member of the general public and wish to learn more about the SHIP program, visit our home page. If you are a SHIP representative and think your request was denied in error, contact a SHIP administrator to inquire. A SHIP locator is available on our home page.");
            sb.AddNewHtmlLines(2);
            sb.Append("Sincerely, ");
            sb.AddNewHtmlLine();
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append("<a href='https://portal.shiptacenter.org'>portal.shiptacenter.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #8
0
        private static string CreateEmailBodyForSendApproveEmail(string userName)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.AppendFormat("Dear {0},", userName);
            sb.AddNewHtmlLines(2);
            sb.Append("Your request to shiptacenter.org account has been approved.");
            sb.AddNewHtmlLines(2);
            sb.Append("Your registration to access the SHIP only area of <a href='www.shiptacenter.org'>www.shiptacenter.org</a> has been approved by a SHIP administrator. You may login at <a href='www.shiptacenter.org'>www.shiptacenter.org</a> using the email and password you provided upon registration. ");
            sb.AddNewHtmlLines(2);

            sb.Append("If you do not remember your password, visit <a href='www.shiptacenter.org'>www.shiptacenter.org</a>, click on the orange padlock (SHIP Login), and use the forgot your password link. Follow the instructions to have the password reset instructions emailed to you. You must respond within 72 hours or you will have to repeat the steps above. Once you reset your password, you should be able to log in to the website with your username (email address) and new password.");
            sb.AddNewHtmlLines(2);


            sb.Append("Sincerely,");
            sb.AddNewHtmlLines(2);
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append("<a href='www.shiptacenter.org'>www.shiptacenter.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #9
0
        private static string CreateEmailBodyForRegistrationNotification(RegisterViewModel userAccount)
        {
            //Email to state director:
            //Dear (first name),
            //A request to become an approved user of the “For SHIPs” area of portal.shiptacenter.org has been received from (first name last name).
            //Please review this request on your administrator dashboard at portal.shiptacenter.org to approve or deny the request.
            //Sincerely,
            //The SHIP National Technical Assistance Center
            //portal.shiptacenter.org
            //877-839-2675

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST User Registration from DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);
            }
            sb.AppendFormat("-----------New User Registration Notification------------"); sb.AddNewHtmlLines(2);


            sb.Append("A request to become an approved user of the “For SHIPs” area of portal.shiptacenter.org has been received.");
            sb.AddNewHtmlLine();
            sb.Append("Please review this request on your administrator dashboard at portal.shiptacenter.org to approve or deny the request.");

            sb.AddNewHtmlLines(3);


            sb.Append("Here is a summary of the registration:"); sb.AddNewHtmlLines(2);

            sb.Append("<strong>Personal Information:</strong>"); sb.AddNewHtmlLine();
            sb.AppendFormat("Name: {0}", userAccount.FirstName); sb.AddNewHtmlLine();
            sb.AppendFormat("Last Name: {0}", userAccount.LastName); sb.AddNewHtmlLine();

            sb.Append("<strong>Contact Information:</strong>"); sb.AddNewHtmlLine();
            sb.AppendFormat("Primary Phone: {0}", userAccount.Phone); sb.AddNewHtmlLine();
            sb.AppendFormat("Primary Email: {0}", userAccount.EmailAddress); sb.AddNewHtmlLine();

            sb.Append("<strong>Requested Account Information:</strong>"); sb.AddNewHtmlLine();
            sb.AppendFormat("State: {0}", userAccount.State); sb.AddNewHtmlLines(2);


            //Need to add User Descriptor and Regional Access profile by verifying what role or agency was selected.

            sb.Append("Sincerely,");
            sb.AddNewHtmlLines(2);
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.EmailOfResourceCenter);
            sb.AddNewHtmlLines(5);


            return(sb.ToString());
        }
Beispiel #10
0
        //this UserId is passed is the RegisteredUserId/requester UserId
        private static bool SendApprovedEmail(int UserId, string uniqueId)
        {
            UserViewData userView = UserBLL.GetUser(UserId);

            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.AppendFormat("Dear {0},", userView.FullName);
            sb.AddNewHtmlLines(2);
            sb.Append("Your request for a CMS SHIP Unique ID has been approved.");
            sb.AddNewHtmlLines(2);

            //sammit: new business rule do not show the unique ID in the e-mail
            //sb.Append("Your CMS SHIP Unique ID is: " + uniqueId);
            //sb.AddNewHtmlLines(2);

            sb.Append("You may login anytime to the SHIPtalk website and find 'CMS SHIP Unique ID' under 'My Profile'.");
            sb.AddNewHtmlLines(2);

            sb.Append("Note: The Unique ID will not be recognized by Customer Services Representatives until the 1st week of the following month.");
            sb.AddNewHtmlLines(2);

            sb.Append("Thank you,");
            sb.AddNewHtmlLine();

            sb.Append("SHIP NPR Help Desk");
            sb.AddNewHtmlLine();

            sb.Append("<a href='https://shipnpr.shiptalk.org'>https://shipnpr.shiptalk.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);


            ShiptalkMailMessage mailMessage = new ShiptalkMailMessage(true, ShiptalkMailMessage.MailFrom.ShiptalkResourceCenter);

            mailMessage.ToList.Add(userView.PrimaryEmail);
            mailMessage.Subject = "Your SHIPtalk.org request for CMS SHIP Unique ID";

            mailMessage.Body = sb.ToString();
            ShiptalkMail mail = new ShiptalkMail(mailMessage);


            try
            {
                mail.SendMail();
                return(true);
            }
            catch { }

            return(false);
        }
Beispiel #11
0
        private static bool SendRevokeEmail(int RegisteredUserId)
        {
            UserViewData userView = UserBLL.GetUser(RegisteredUserId);

            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.AppendFormat("Dear {0},", userView.FullName);
            sb.AddNewHtmlLines(2);
            sb.Append("Your CMS SHIP Unique ID has been revoked by the State SHIP Director or by the Administrator.");
            sb.AddNewHtmlLines(2);

            sb.Append("If you feel that your CMS SHIP Unique ID account has been deleted in error, please contact your State SHIP Director.");
            sb.AddNewHtmlLines(2);

            sb.Append("Thank you,");
            sb.AddNewHtmlLine();

            sb.Append("SHIP NPR Help Desk");
            sb.AddNewHtmlLine();

            sb.Append("<a href='https://shipnpr.shiptalk.org'>https://shipnpr.shiptalk.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);


            ShiptalkMailMessage mailMessage = new ShiptalkMailMessage(true, ShiptalkMailMessage.MailFrom.ShiptalkResourceCenter);

            mailMessage.ToList.Add(userView.PrimaryEmail);
            mailMessage.Subject = "Your SHIPtalk.org request for CMS SHIP Unique ID is revoked.";

            mailMessage.Body = sb.ToString();
            ShiptalkMail mail = new ShiptalkMail(mailMessage);


            try
            {
                mail.SendMail();
                return(true);
            }
            catch { }

            return(false);
        }
Beispiel #12
0
        private static string CreateVerifyEmailBody(string firstName, string confirmLink, string textlink)
        {
            //Dear (first name),
            //Your request to access the “For SHIPs” area of portal.shiptacenter.org has been received.
            //Follow this link [URL] to verify your email address and submit your registration for approval.
            //If you have difficulties accessing the link, copy and paste the link below to your browser to verify your email address: Final URL goes here.
            //The director for your State Health Insurance Assistance Program (SHIP) will review your request.
            //You will receive an email from [email protected] when the director’s decision has been made. If you have not received a reply within a week, please contact [email protected].
            //Sincerely,
            //The SHIP National Technical Assistance Center
            //portal.shiptacenter.org
            //877-839-2675


            //HTML Message
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST  User Registration DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.AppendFormat("Dear {0},", firstName.ToCamelCasing());
            sb.AddNewHtmlLines(2);
            sb.Append("Your request to access the \"For SHIPs\" area of portal.shiptacenter.org has been received.");
            sb.AddNewHtmlLines(3);
            sb.AppendFormat("{0} to verify your email address and submit your registration for approval.", confirmLink);
            sb.AppendFormat(" If you have difficulties accessing the link, copy and paste the link below to your browser to verify your email address:");
            sb.AddNewHtmlLines(2);
            sb.Append(textlink);
            sb.AddNewHtmlLines(3);
            sb.Append("The director for your State Health Insurance Assistance Program (SHIP) will review your request.");
            sb.Append(" You will receive an email from [email protected] when the director’s decision has been made. If you have not received a reply within a week, please contact [email protected].");
            sb.AddNewHtmlLines(3);
            sb.Append("Sincerely,");
            sb.AddNewHtmlLines(2);
            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.EmailOfResourceCenter);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #13
0
        private string CreateEmailBodyForPasswordCanNotBeChanged()
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append("You already changed your password. You are allowed to change your password once in a day");
            sb.AddNewHtmlLines(2);
            sb.Append("Contact help desk to unlock, verify your identity, and change password.");

            sb.AddNewHtmlLines(3);
            sb.Append("Thank you,");
            sb.AddNewHtmlLine();
            sb.Append("SHIPNPR Help Desk");
            sb.AddNewHtmlLine();
            sb.Append("<a href='portal.shiptacenter.org'>portal.shiptacenter.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #14
0
        private string CreateEmailBodyForResetPassword(string userEmailId, string resetGUID)
        {
            string linkFormat = "<a href='" + ConfigUtil.PasswordResetUrl + "?email={0}&guid={1}'>Follow this link</a>";
            string ResetLink  = string.Format(linkFormat, userEmailId, resetGUID);
            string textlink   = ConfigUtil.PasswordResetUrl + "?email={0}&guid={1}";

            textlink = string.Format(textlink, userEmailId, resetGUID);

            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST Reset Your Password from DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.Append("Hello,");
            sb.AddNewHtmlLines(2);
            sb.Append("A request to reset your password was made at <a href='www.shiptacenter.org'>www.shiptacenter.org.</a>");
            sb.AddNewHtmlLine();
            sb.Append("If you did not request your password reset, please disregard this message.");
            sb.AddNewHtmlLines(2);


            sb.Append(ResetLink);//Follow this link ahref
            sb.Append(" within 72 hours to reset your password. If you have difficulties accessing the link, copy and paste the link below into your browser’s address bar to verify your email address.");
            sb.AddNewHtmlLines(2);
            sb.Append(textlink);
            sb.AddNewHtmlLines(3);
            sb.Append("Note: If you are reading this email more than 72 hours after your request, you will need to generate a new request. Go to <a href='www.shiptacenter.org'>www.shiptacenter.org</a>, click the orange SHIP Login padlock, and click forgot your password.");

            sb.AddNewHtmlLines(3);
            sb.Append("Thank you,");
            sb.AddNewHtmlLine();
            sb.Append("SHIP National Technical Assistance Center.");
            sb.AddNewHtmlLine();
            sb.Append("<a href='www.shiptacenter.org'>www.shiptacenter.org</a>");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }
Beispiel #15
0
        protected bool SendVerificationEmail(int newUserId)
        {
            string EmailAddress = UserName;

            Guid   VerificationToken  = UserBLL.GetEmailVerificationTokenForUser(newUserId);
            string sVerificationToken = string.Empty;

            if (VerificationToken == Guid.Empty)
            {
                DisplayMessage("An error occured while preparing content for email address verification procedure. Please contact support if this issue persists.", true);
                return(false);
            }
            else
            {
                sVerificationToken = VerificationToken.ToString();
            }

            string linkFormat       = "<a href='" + ConfigUtil.EmailConfirmationUrl + "?evt={0}'>Follow this link</a>";
            string confirmLinkParam = EmailAddress + sVerificationToken;
            string confirmLink      = string.Format(linkFormat, confirmLinkParam);

            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            sb.AppendFormat("Dear {0} {1},", FirstName.Text.Trim().ToCamelCasing(), LastName.Text.Trim().ToCamelCasing());
            sb.AddNewHtmlLines(2);
            sb.Append("A new user account has been registered for you, at the SHIPtalk.org web site.");
            sb.AddNewHtmlLines(2);
            sb.Append("It is required that you verify your email address using the following link:");
            sb.AddNewHtmlLine();
            sb.AppendFormat(confirmLink);
            sb.AddNewHtmlLines(2);
            sb.Append("You will be able to login to the SHIPtalk web site upon successful verification of the email using the above link.");
            sb.AddNewHtmlLine();
            sb.AppendFormat("If you would like to contact the person who created your account, please use the following email address: {0}", this.AccountInfo.PrimaryEmail);
            sb.AddNewHtmlLines(2);
            sb.Append("Thank you,");
            sb.AddNewHtmlLine();
            sb.Append("SHIPtalk.org");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLines(5);


            ShiptalkMailMessage mailMessage = new ShiptalkMailMessage(true, ShiptalkMailMessage.MailFrom.ShiptalkResourceCenter);

            mailMessage.ToList.Add(this.UserName);
            mailMessage.Subject = "Welcome to SHIPtalk.org!";

            mailMessage.Body = sb.ToString();
            ShiptalkMail mail = new ShiptalkMail(mailMessage);

            if (!mail.SendMail())
            {
                DisplayMessage("An error occured while sending email to the address provided.", true);
                return(false);
            }
            else
            {
                return(true);
            }
        }
Beispiel #16
0
        private string CreateEmailToUserApprovedByShipAdminBody(string firstName)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            if (ConfigUtil.WebEnvironment != "prod")
            {
                sb.AppendFormat("-----------TEST  User Registration DEV site------------"); sb.AddNewHtmlLines(2);
                sb.AppendFormat("-----------Created from DEV environment: {0}------------", ConfigUtil.WebEnvironment); sb.AddNewHtmlLines(2);;
            }
            sb.AppendFormat("Dear {0},", firstName.ToCamelCasing());
            sb.AddNewHtmlLines(2);
            sb.Append(@"An account to access the password-protected area of portal.shiptacenter.org has been created for you.
                This website is hosted by the State Health Insurance Assistance Program National Technical Assistance 
               Center (SHIP TA Center). The password-protected area of www.shiptacenter.org houses educational 
                materials for SHIP representatives such as staff, partners, counselors, or counselors in training. SHIP is a 
                national program; however, we realize some programs have state-specific names and go by acronyms 
                such as SHIBA, APPRISE, or SHICK, to name a few.");
            sb.AddNewHtmlLines(2);
            sb.AppendLine("Please follow these instructions to access your account:");
            sb.AddNewHtmlLine();
            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1. Go to <a href='www.shiptacenter.org'>www.shiptacenter.org</a> and click on the orange padlock (SHIP Login)");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2. Click \"Forgot Password\" ");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3. Enter your email address");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4. A link to create your own password will arrive from [email protected] with the ");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;subject \"Your request at the shiptacenter.org\" ");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;5. Follow the link to create a private password");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a. Your password must be between 8 to 30 characters and must contain at least ");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;one case letter, at least one digit and at least one special character,");
            sb.AddNewHtmlLine();

            sb.AppendLine("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;with the exception of the characters < and &, which cannot be used.");

            sb.AddNewHtmlLines(2);

            sb.Append("If you have any questions, please contact your SHIP supervisor or the SHIP TA Center. ");
            sb.AddNewHtmlLines(2);

            sb.Append("Thank you!  ");
            sb.AddNewHtmlLines(2);

            sb.Append("The SHIP National Technical Assistance Center");
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.EmailOfResourceCenter);
            sb.AddNewHtmlLine();
            sb.Append(ConfigUtil.ShiptalkSupportPhone);
            sb.AddNewHtmlLine();

            sb.AddNewHtmlLines(5);

            return(sb.ToString());
        }