Beispiel #1
0
        public static void Alert(User user, Activity recent)
        {
            string subject = $"New Sign-in from {recent.browser} on {recent.os}";

            string body = $@"Hi {user.name},

Your PassCrypter account was just accesssed from {recent.browser} on {recent.os}.
If you don't recognize this activity, it is very likely that some one has gained unauthorized access to your account.

You are receiving this email because you've enbled Alert and Notifications from your account settings.";

            Messager.SendEmail(user.email, subject, body, ".");
        }
Beispiel #2
0
        public JsonResult support(string name, string emailTo, string subject, string body, string email)
        {
            try
            {
                if (!UserExists(email))
                {
                    return(Json(new { sent = false, reason = "Wrong email or password." }));
                }

                body = "Respond To: " + emailTo + "\n" + body;
                Messager.SendEmail(Messager.EMAIL, "PassCrypter Support: " + subject, body);

                return(Json(new { sent = true }));
            }
            catch (Exception e)
            {
                return(Json(new { sent = false, reason = "An error has occurred." }));
            }
        }