Skip to content

Instantly share code, notes, and snippets.

@zs40x
Last active February 14, 2016 06:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zs40x/c5ff11613690c6331330 to your computer and use it in GitHub Desktop.
Save zs40x/c5ff11613690c6331330 to your computer and use it in GitHub Desktop.
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