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()); }
private void AddRegistrationCode(RegistrationLinkCode code) { registrationLinkCode = code; }