Example #1
0
 private void SendMail(UserName user, Book book)
 {
     MailAddress from = new MailAddress("*****@*****.**", "Library");
     MailAddress to = new MailAddress(user.Email);
     MailMessage msg = new MailMessage(from, to);
     msg.Subject = "You have a new book";
     msg.Body = string.Format("{0}, you are successfully taken a book called \"{1}\"", user.Name, book.Name);
     SmtpClient smtp = new SmtpClient();
     smtp.Send(msg);
 }
Example #2
0
 partial void UpdateUserName(UserName instance);
Example #3
0
 partial void DeleteUserName(UserName instance);
Example #4
0
 partial void InsertUserName(UserName instance);