O'Reilly logo

ASP.NET Core: Cloud-ready, Enterprise Web Application Development by James Singleton, Valerio De Sanctis, Mugilan T. S. Ragupathi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

E-mail and SMS services

If you want to add e-mail and SMS services to your application's authentication capabilities, you can do so by creating the interfaces and classes shown here: 

public interface IEmailSender {         Task SendEmailAsync(string email, string subject, string message)   }   public interface ISmsSender     {         Task SendSmsAsync(string number, string message);     } public class AuthMessageSender : IEmailSender, ISmsSender     {         public Task SendEmailAsync(string email, string subject, string message)         {             // We can plug in our email service here to send an email.             return Task.FromResult(0);         }         public Task SendSmsAsync(string number, string message)         {             ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required