예제 #1
0
        public async Task SendForgotPasswordEmailAsync(EmailData verifyEmailData)
        {
            var templateId = "d-dbaf10c1b0184df6af7d188f333bd863";

            var msg = EmailFunctions.GenerateMsg("*****@*****.**", "Fortheeco", templateId, verifyEmailData.User.Email);

            string token = WebUtility.UrlEncode(verifyEmailData.Token);
            string id    = WebUtility.UrlEncode(verifyEmailData.User.Id.ToString());

            var data = new VerifyEmailObject()
            {
                FirstName = verifyEmailData.User.UserDetail.FirstName,
                Url       = $"{_hostname}/public/reset-password?token={token}&userId={id}"
            };

            await SendData(data, msg);
        }
예제 #2
0
        public async Task SendChangePasswordNotificationAsync(EmailData VerifyEmailData)
        {
            var templateId = "d-8dbe4d32d3c142ff97717ee4609073b9";

            var msg = EmailFunctions.GenerateMsg("*****@*****.**", "Fortheeco", templateId, VerifyEmailData.User.Email);

            string token = WebUtility.UrlEncode(VerifyEmailData.Token);
            string id    = WebUtility.UrlEncode(VerifyEmailData.User.Id.ToString());

            var data = new VerifyEmailObject()
            {
                FirstName = VerifyEmailData.User.UserDetail.FirstName,
                Url       = $"{_hostname}/public/reset-password?token={token}&userId={id}"
            };

            await SendData(data, msg);
        }
예제 #3
0
        // ------------------------------------------------

        public async Task SendVerifyEmailAsync(EmailData verifyEmailData)
        {
            // Send Grid template for verify email
            string VerifyEmailTemplateId = "d-ba9d004d434d49bfa5f7b137210c548e";

            var msg = EmailFunctions.GenerateMsg("*****@*****.**", "Fortheeco", VerifyEmailTemplateId, verifyEmailData.User.Email);

            string token = WebUtility.UrlEncode(verifyEmailData.Token);
            string id    = WebUtility.UrlEncode(verifyEmailData.User.Id.ToString());

            var data = new VerifyEmailObject()
            {
                FirstName = verifyEmailData.User.UserDetail.FirstName,
                Url       = $"{_hostname}/public/verify-email?token={token}&userId={id}"
            };

            await SendData(data, msg);
        }
예제 #4
0
        public async Task SendForgotPasswordEmailAsync(EmailData VerifyEmailData)
        {
            var templateId = "d-dbaf10c1b0184df6af7d188f333bd863";

            var msg = EmailFunctions.GenerateMsg("*****@*****.**", "Eco Team", templateId, VerifyEmailData.User.Email);

            string token = WebUtility.UrlEncode(VerifyEmailData.Token);
            string id    = WebUtility.UrlEncode(VerifyEmailData.User.Id.ToString());

            var data = new VerifyEmailObject()
            {
                FirstName = VerifyEmailData.User.UserDetail.FirstName,
                Url       = $"{_hostname}/public/reset-password?token={token}&userId={id}"
            };

            msg.SetTemplateData(data);

            await _client.SendEmailAsync(msg);
        }
예제 #5
0
        // ------------------------------------------------

        public async Task SendVerifyEmailAsync(EmailData verifyEmailData)
        {
            // Send Grid template for verify email
            string VerifyEmailTemplateId = "d-ba9d004d434d49bfa5f7b137210c548e";

            var msg = EmailFunctions.GenerateMsg("*****@*****.**", "Eco Team", VerifyEmailTemplateId, verifyEmailData.User.Email);

            string token = WebUtility.UrlEncode(verifyEmailData.Token);
            string id    = WebUtility.UrlEncode(verifyEmailData.User.Id.ToString());

            var data = new VerifyEmailObject()
            {
                FirstName = verifyEmailData.User.UserDetail.FirstName,
                Url       = $"{_hostname}/public/verify-email?token={token}&userId={id}"
            };

            msg.SetTemplateData(data);

            // await WriteToFile(data.Url);

            await _client.SendEmailAsync(msg);
        }