// protection against multi-accounting on one e-mail address (gmail)
        public static string ParseEmail(string email)
        {
            email = email.ToLower();

            if (email.Contains("@gmail"))
            {
                var emailId = email.Substring(0, email.IndexOf('@'));
                email = email.Remove(0, email.IndexOf('@'));

                if (emailId.Contains('.'))
                {
                    emailId = Re.Replace(emailId, string.Empty);
                }

                return(string.Concat(emailId, email));
            }

            return(email);
        }
Beispiel #2
0
 protected void ReadTemplate()
 {
     FileContents = File.ReadAllText(TemplatePath);
     Body         = Re.Replace(FileContents, match => Fields[match.Groups[1].Value]);
 }