Last active
February 14, 2016 06:21
-
-
Save zs40x/c5ff11613690c6331330 to your computer and use it in GitHub Desktop.
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) | |
{ | |
string message = "Dear "; | |
message += userToNotify.Username; | |
message += " this is a Notification!"; | |
if(userToNotify.IsPremium) | |
message += " -> Additional Information for Premium Users!"; | |
smtpClient.sendMail(userToNotify.EMailAddress, "Notification", message); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment