vendredi 6 mai 2016

Send Birthday E-Mail


Im trying to create a function where i send Email to a user when it their birthday. I have all their personal data in my database, so I just wonder like where do i start? Or what do i do? Im creating this in an MVC app. This is what i've done so far.

public bool BirthdayEmail (int userId, int birthdate)
 var userbirthday = db.Contacts.Where(x => x.CustomerId == birthdate).FirstOrDefault();
return userbirthday;

Aucun commentaire:

Enregistrer un commentaire