This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Core.Interfaces | |
{ | |
public interface SendMail | |
{ | |
void sendMail(string recipient, string subject, string message); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Core.Interfaces; | |
using Core.Model; | |
namespace Core.Services | |
{ | |
public class NotificationService | |
{ | |
SendMail sendMail; | |
public NotificationService(SendMail _sendMail) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UserEMailNotificationSender.Infrastucture; | |
using UserEMailNotificationSender.Model; | |
namespace UserEMailNotificationSender.BL | |
{ | |
class SMTPNotificationSender | |
{ | |
SMTPClient smtpClient = new SMTPClient(); | |
public void sendNotificationForUser(User userToNotify) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UserEMailNotificationSender.BL; | |
using UserEMailNotificationSender.Model; | |
namespace UserEMailNotificationSender | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
User aUser = new User("TheUser", "the_user@mail_service.com", false); |
NewerOlder