Ejemplo n.º 1
0
        public bool SendFeedbackToUserEmail(string userFirstName, string friendFirstName, string friendEmail, string feedback)
        {
            try
            {

                UserFeedbackModel userFeedbackModel = new UserFeedbackModel()
                {
                    UserFirstName = userFirstName,
                    FriendFirstName = friendFirstName,
                    Feedback = feedback
                };

                String messageBody = generateEmailBody(Manager.Properties.Resources.UserFeedbackTemplate.ToString(), userFeedbackModel);
                SendMessage("*****@*****.**", "Vestn", new String[1] { friendEmail }, null, null, userFirstName + " left you feedback on your Vestn profile", messageBody);
                return true;
            }
            catch (Exception e)
            {
                logAccessor.CreateLog(DateTime.Now, this.GetType().ToString() + "." + System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), e.ToString());
                return false;
            }
        }
Ejemplo n.º 2
0
 private string generateEmailBody(string template, UserFeedbackModel 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;
     }
 }