Skip to content

Instantly share code, notes, and snippets.

namespace Core.Interfaces
{
public interface SendMail
{
void sendMail(string recipient, string subject, string message);
}
}
using Core.Interfaces;
using Core.Model;
namespace Core.Services
{
public class NotificationService
{
SendMail sendMail;
public NotificationService(SendMail _sendMail)
using UserEMailNotificationSender.Infrastucture;
using UserEMailNotificationSender.Model;
namespace UserEMailNotificationSender.BL
{
class SMTPNotificationSender
{
SMTPClient smtpClient = new SMTPClient();
public void sendNotificationForUser(User userToNotify)
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);