示例#1
0
        public async Task <IActionResult> SendRegistrationLink([FromBody] RegistrationLinkModel model)
        {
            var code = GenerateRandomString(6);
            var registrationLinkCode = new RegistrationLinkCode()
            {
                Code = code
            };

            _registrationLinkCodeData.AddRegistrationLinkCode(registrationLinkCode);
            var message = new EmailMessage(new string[] { model.Email }, "Registratie mijnStage.be", @"http://localhost:8080/#/registratiestudent/" + code);
            await _emailSender.SendEmailAsync(message);

            return(Ok());
        }
示例#2
0
 private void AddRegistrationCode(RegistrationLinkCode code)
 {
     registrationLinkCode = code;
 }