Configuring your applications and services
In the previous sections, you have further advanced by adding missing components to the user registration process and even localizing parts of the Tic-Tac-Toe application. However, you have always simulated the email confirmation by setting the user confirmation programmatically in code. In this section, we will modify this part to really send emails to newly-registered users and make everything fully configurable.
First, you are going to add a new Email Service
, which will be used to send emails to users who have freshly registered on the website:
- Within the
Services
folder, add a new service calledÂEmailService
, and implement a defaultSendEmail
method (we will update it later):
public class EmailService { public Task SendEmail(string emailTo, string subject, string message) { return Task.CompletedTask; } }
- Extract the
IEmailService
interface:
- Add the new
Email Service...