private static void SendWelcomeMail(Account acc, string password) { //TODO: Implement welcome mail... string email = acc.Account_Information.FirstOrDefault()?.Email; if (!string.IsNullOrEmpty(email) && EmailHelper.IsValidEmail(email)) { var club = ClubDAL.GetClub(acc.ClubId); string subject = string.Format("Välkommen till gradera system och {0}", club.Name); string emailBody = string.Format(@"<div style='text-align: center;'> <h2>Välkommen {0}</h2> <p>Ditt användarnamn är: {1}</p> <p>Ditt lösenord är: {2}</p> <p><a href='http://club.gradera.nu/'>Logga in här</a></p> </div>", string.Format("{0} {1}", acc.FirstName, acc.LastName), acc.UserName, password); EmailHelper.SendEmail(email, emailBody, subject); } }
public static Club GetClub(int clubId) { return(ClubDAL.GetClub(clubId)); }