Пример #1
0
        public Task <bool> SendValidByEmail(string openId, string emailAddress)
        {
            var bindEmailPolicy = new EmailPolicy();
            var validCode       = bindEmailPolicy.GetBindEmailValidCode(EmailValidCodeType.BindEmail);

            CacheHelper.SetCache(openId, validCode);
            var emailBody = bindEmailPolicy.GetEmailBody(validCode);

            return(_directEmailService.SendValidCodeByEmail(emailAddress, emailBody, "彩盟网邮箱绑定验证码"));
        }
Пример #2
0
        public Task <bool> SendRetrievePwdValidCode(string openId, string email)
        {
            var emailPolicy = new EmailPolicy();
            var validCode   = emailPolicy.GetBindEmailValidCode(EmailValidCodeType.RetrievePwd);

            CacheHelper.SetCache(m_retrievePwdCachePrefix + openId, validCode);
            var emailBody = emailPolicy.GetEmailBody(validCode);

            return(_directEmailService.SendValidCodeByEmail(email, emailBody, "彩盟网密码找回"));
        }