public ActionResult Create(FormCollection collection) { Account account = new Account(collection["Voornaam"], collection["Tussenvoegsel"], collection["Achternaam"], Convert.ToInt32(collection["Telefoonnummer"]), collection["Gebruikersnaam"], collection["Wachtwoord"], collection["Email"], MD5.CreateMD5(collection["Email"]), 0); try { // TODO: Add insert logic here accountrepo.InsertAccount(account); Models.Email mail = new Models.Email("Activeer uw account", "inhoud", "*****@*****.**"); //EmailLogic.SendEmail(mail); EmailLogic.SendEmailNew(mail, account.Activatiehash, account.Voornaam); return(RedirectToAction("Create", "Account")); } catch { throw; //return View(); } }