Ejemplo n.º 1
0
        public static bool ConfirmingNewPasswordEmail(string recipient, string applicationName, string name, string newPassword)
        {
            Hashtable templateVars = new Hashtable();

            templateVars.Add("ApplicationName", applicationName);
            templateVars.Add("name", name);
            templateVars.Add("newPassword", newPassword);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/ConfirmingNewPasswordMail.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = "New password for Group.Direct and GroupConnect";

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, recipient);
        }
Ejemplo n.º 2
0
        public static bool ConfirmCompanySignupRequestAcceptance(string emailAddress, string userName, string password)
        {
            string applicationName = ConfigurationManager.AppSettings["ApplicationName"];

            Hashtable templateVars = new Hashtable();
            templateVars.Add("ApplicationName", applicationName);
            templateVars.Add("userName", userName);
            templateVars.Add("password", password);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/ConfirmCompanyAcceptance.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = "Welcome to Group.Direct App Suite!";

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, emailAddress);
        }
Ejemplo n.º 3
0
        public static bool RejectCompanySignupRequestEmail(string emailAddress)
        {
            string applicationName = ConfigurationManager.AppSettings["ApplicationName"];

            Hashtable templateVars = new Hashtable();
            templateVars.Add("ApplicationName", applicationName);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/RejectCompanySignupRequest.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = "Your Company Signup Request has been Rejected!";

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, emailAddress);
        }
Ejemplo n.º 4
0
        public static bool SendSignupRequestMail(string recipient, string name, string activatiCode)
        {
            string applicationName = ConfigurationManager.AppSettings["ApplicationName"];

            Hashtable templateVars = new Hashtable();
            templateVars.Add("ApplicationName", applicationName);
            templateVars.Add("email", recipient);
            templateVars.Add("name", name);
            templateVars.Add("activationCode", activatiCode);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/SignupRequestMail.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = "Activate your GroupConnect Apps account";

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, recipient);
        }
Ejemplo n.º 5
0
        public static bool SendPasswordResetTokenEmail(string recipient, string applicationName, string name, string token, string userName)
        {
            Hashtable templateVars = new Hashtable();

            templateVars.Add("ApplicationName", applicationName);
            templateVars.Add("name", name);
            templateVars.Add("token", token);
            templateVars.Add("userName", userName);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/PasswordResetTokenMail.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = "Group.Direct and GroupConnect Apps password reset";

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, recipient);
        }
Ejemplo n.º 6
0
        public static bool SendConnectionInvitationMail(string recipient, string name, string requesterName)
        {
            string applicationName = ConfigurationManager.AppSettings["ApplicationName"];

            string url = ConfigurationManager.AppSettings["GroupDirectSignupUrl"];

            Hashtable templateVars = new Hashtable();
            templateVars.Add("ApplicationName", applicationName);
            templateVars.Add("email", recipient);
            templateVars.Add("name", name);
            templateVars.Add("requester", requesterName);
            templateVars.Add("url", url);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/ConnectInvitationMail.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = requesterName + " invited you to connect on group.direct";

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, recipient);
        }
Ejemplo n.º 7
0
        public static bool SendCompanySignupRequestEmailToSuperAdmin(string emailAddress, string companyName, string address, string contactPerson, string contactEmail)
        {
            string applicationName = ConfigurationManager.AppSettings["ApplicationName"];

            Hashtable templateVars = new Hashtable();
            templateVars.Add("ApplicationName", applicationName);
            templateVars.Add("companyName", companyName);
            templateVars.Add("address", address);
            templateVars.Add("contactperson", contactPerson);
            templateVars.Add("emailaddress", contactEmail);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/CompanySignupRequestEmail.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = "New Company Signup Request!";

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, emailAddress);
        }
Ejemplo n.º 8
0
        //public static bool SendRegistrationEmail(string recipient, string applicationName, string name, string userName, string password, int userType)
        //{
        //    Hashtable templateVars = new Hashtable();
        //    templateVars.Add("ApplicationName", applicationName);
        //    templateVars.Add("name", name);
        //    templateVars.Add("userName", userName);
        //    Parser parser = new Parser();
        //    if (userType == Convert.ToInt32(Enums.UserType.EmailUser))
        //    {
        //        templateVars.Add("userType", "email");
        //        templateVars.Add("password", password);
        //        parser = new Parser(HostingEnvironment.MapPath("~/" + Config.MailBodyFolderPath + "/UserRegistrationAsEmailUser.htm"), templateVars);
        //    }
        //    if (userType == Convert.ToInt32(Enums.UserType.FacebookUser))
        //    {
        //        templateVars.Add("userType", "facebook");
        //        templateVars.Add("login", "Facebook Login Id");
        //        parser = new Parser(HostingEnvironment.MapPath("~/" + Config.MailBodyFolderPath + "/UserRegistrationAsOtherUser.htm"), templateVars);
        //    }
        //    if (userType == Convert.ToInt32(Enums.UserType.Twitteruser))
        //    {
        //        templateVars.Add("userType", "twitter");
        //        templateVars.Add("login", "Twitter Login Id");
        //        parser = new Parser(HostingEnvironment.MapPath("~/" + Config.MailBodyFolderPath + "/UserRegistrationAsOtherUser.htm"), templateVars);
        //    }
        //    string mailBody = parser.Parse();
        //    //string mailBody = "You are Successfully Registered";
        //    string subject = "User Registration";
        //    string from = Config.MailAddressFrom;
        //    return SendEmail(subject, mailBody, from, recipient);
        //}
        public static bool SendCompanyInvitationCode(string senderName, string recipient,string activationCode,string companyName)
        {
            string applicationName = ConfigurationManager.AppSettings["ApplicationName"];

            string siteurl = ConfigurationManager.AppSettings["gdsiteurl"];

            Hashtable templateVars = new Hashtable();
            templateVars.Add("ApplicationName", applicationName);
            templateVars.Add("email", recipient);
            templateVars.Add("companyName", companyName);
            templateVars.Add("activationCode", activationCode);
            templateVars.Add("senderName", senderName);

            Parser parser = new Parser();

            parser = new Parser(HostingEnvironment.MapPath("~/" + UIConfig.MailBodyFolderPath + "/CompanyInvitationCode.htm"), templateVars);

            string mailBody = parser.Parse();

            //string mailBody = "You are Successfully Registered";

            string subject = senderName + " invited you to join " + companyName + " on " + applicationName;

            string from = UIConfig.MailAddressFrom;

            return SendEmail(subject, mailBody, from, recipient);
        }