示例#1
0
        public MailObject WriteToMailObject(MailObject message)
        {
            var _accountSettings = Engine.Settings.Account;

            if (_accountSettings.VerifySubject.IsSet())
            {
                message.Subject = _accountSettings.VerifySubject.ReplaceUserVariables(User).ReplaceSiteVariables();
            }
            else
            {
                message.Subject = "Confirm your email address for {Site.Title}.".ReplaceUserVariables(User).ReplaceSiteVariables();
            }

            if (_accountSettings.VerifyTitle.IsSet())
            {
                message.PreHeader = _accountSettings.VerifyTitle.ReplaceUserVariables(User).ReplaceSiteVariables();
            }
            else
            {
                message.PreHeader = "Confirm your email address.";
            }

            if (_accountSettings.VerifyMessage.IsSet())
            {
                message.AddDiv(_accountSettings.VerifyMessage.ReplaceSiteVariables().ReplaceUserVariables(User));
            }
            else
            {
                message.AddParagraph("You have been sent this in order to confirm your email.");
            }

            message.AddParagraph("Your username: <strong>" + User.UserName + "</strong>");

            message.AddParagraph("Please click the link below to confirm your email.");
            message.AddCallToAction("Confirm your Email", ConfirmLink);
            message.AddParagraph($"Or visit the following URL: {ConfirmLink}");

            return(message);
        }
示例#2
0
        public MailObject WriteToMailObject(MailObject message)
        {
            var _accountSettings = Engine.Settings.Account;

            if (_accountSettings.WelcomeSubject.IsSet())
            {
                message.Subject = _accountSettings.WelcomeSubject.ReplaceUserVariables(User).ReplaceSiteVariables();
            }
            else
            {
                message.Subject = "Your new account on {Site.Title}.".ReplaceUserVariables(User).ReplaceSiteVariables();
            }

            if (_accountSettings.WelcomeTitle.IsSet())
            {
                message.PreHeader = _accountSettings.WelcomeTitle.ReplaceUserVariables(User).ReplaceSiteVariables();
            }
            else
            {
                message.PreHeader = "Your new account.";
            }

            if (_accountSettings.WelcomeMessage.IsSet())
            {
                message.AddDiv(_accountSettings.WelcomeMessage.ReplaceUserVariables(User).ReplaceSiteVariables());
            }
            else
            {
                message.AddParagraph("Thank you for creating an account on {Site.Title}".ReplaceUserVariables(User).ReplaceSiteVariables());
            }

            message.AddParagraph("Your username: <strong>" + User.UserName + "</strong>");

            message.AddParagraph("You can log in and access your account by clicking the link below.");
            message.AddCallToAction("Access your account", LoginLink);

            return(message);
        }
示例#3
0
 public MailObject WriteNotificationToMailObject(MailObject message)
 {
     message          = WriteToMailObject(message);
     message.Subject += " - [COPY]";
     return(message);
 }