private string generateEmailBody(string template, RequestBetaKeyModel model) { try { return Razor.Parse(template, model); } catch (Exception ex) { logAccessor.CreateLog(DateTime.Now, this.GetType().ToString() + "." + System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex.ToString()); return ex.Message; } }
public bool SendRequestBetaKeyEmail(string requesterEmail) { //check to see if friendEmail is already associated with an account. //TODO CURRENTLY NOT IMPLEMENTED //IMLEMENTED IN USERMANAGER.CheckDuplicateEmail try { RequestBetaKeyModel requestBetaKeyModel = new RequestBetaKeyModel() { //currently we don't need any user specific data for this... }; String messageBody = generateEmailBody(Manager.Properties.Resources.RequestBetaKeyTemplate.ToString(), requestBetaKeyModel); SendMessage("*****@*****.**", "*****@*****.**", new String[1] { requesterEmail }, null, null, "Your Vestn Beta Key has Arrived!", messageBody); return true; } catch (Exception e) { logAccessor.CreateLog(DateTime.Now, this.GetType().ToString() + "." + System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), e.ToString()); return false; } }