示例#1
0
        protected void ForgotUsername(string EmailAddress)
        {
            string strBody;
            string FirstName     = "";
            string LastName      = "";
            string LoginUsername = "";

            Classes.cLogin Username = new Classes.cLogin();
            Username.GetUsernameByEmail(EmailAddress);
            FirstName     = Username.FirstName;
            LastName      = Username.LastName;
            LoginUsername = Username.Username;

            string strSubject = "Your LARP Portal Username";

            strBody = "Hi " + FirstName + ",<p></p><p></p>Your LARP Portal username is <b>" + LoginUsername + "</b>.  If you need further assistance please contact us ";
            strBody = strBody + "via email at [email protected].<br><br>";
            strBody = strBody + @"Click <u><a href=""https://www.larportal.com"">here</a></u> to log in.";

            Classes.cEmailMessageService MailServer = new Classes.cEmailMessageService();
            try
            {
                MailServer.SendMail(strSubject, strBody, EmailAddress, "", "", "ForgotUsername", "System");
                mvInfoRequest.SetActiveView(vwSentEmail);
            }
            catch (Exception)
            {
                mvInfoRequest.SetActiveView(vwIssue);
            }
        }
        protected void btnSupportSendEmail_Click(object sender, EventArgs e)
        {
            string strBody;
            string strSubject = "Trouble with username / password";

            strBody = "From: " + txtSupportName.Text + "<br>Email: " + txtSupportEmail.Text + "<br><br>Issue Details:<br><br>";
            strBody = strBody + txtSupportBody.Text;
            strBody = strBody + "<br><br>Answers Provided:<br>Email Address: " + txtEmailAddress.Text + "<br>";
            strBody = strBody + "Username: "******"<br>";

            string strCCAddress = "";

            if (chkSupportCCMe2.Checked)
            {
                strCCAddress = txtSupportEmail.Text;
            }

            Classes.cEmailMessageService MailServer = new Classes.cEmailMessageService();
            try
            {
                MailServer.SendMail(strSubject, strBody, txtEmailAddress.Text, strCCAddress, "", "ForgotPasswordSupportRequest", "System");
                lblSupportSentEmail.Text    = "An email has been sent to LARP Portal support.";
                lblSupportSentEmail.Visible = true;
            }
            catch (Exception)
            {
                lblSupportSentEmail.Text    = "An email has been sent to LARP Portal support.";
                lblSupportSentEmail.Visible = true;
            }
        }
示例#3
0
        protected void GenerateWelcomeEmail(string FirstName, string LastName, string Username, string strTo, string ActivationKey)
        {
            string strBody;
            string strSubject = "Your LARP Portal Activation Key";

            strBody = "Hi " + FirstName + "<p></p>Welcome to LARP Portal.  The activation key for your new account is " + ActivationKey + ".  To activate your ";
            strBody = strBody + "account return to www.larportal.com.  Enter your username and password into the Member Login section and click the Login ";
            strBody = strBody + "button.  When the site prompts you for your activation key, enter it and click the Login button again.<p></p>If you have ";
            strBody = strBody + "any questions please email us at [email protected].";
            Classes.cEmailMessageService NotifyStaff = new Classes.cEmailMessageService();
            try
            {
                NotifyStaff.SendMail(strSubject, strBody, strTo, "", "", "ActivationKey", Username);
            }
            catch (Exception)
            {
                lblEmailFailed.Text    = "There was an issue. Please contact us at [email protected] for assistance.";
                lblEmailFailed.Visible = true;
            }
        }
示例#4
0
        protected void NotifyOfNewRegistration()
        {
            string strBody;
            //string strFromUser = "******";
            //string strFromDomain = "larportal.com";
            //string strFrom = strFromUser + "@" + strFromDomain;
            //string strSMTPPassword = "******";
            string strSubject = "New Silverfire event registration - " + lblPlayerName.Text;
            string strTeam    = "";

            if (ddlTeams.SelectedIndex >= 0)
            {
                strTeam = ddlTeams.SelectedItem.Text;
            }
            strBody = lblPlayerName.Text + " has just registered for the upcoming Silverfire event.  <br>Email: " + lblPlayerEmail.Text + "<br>Character: " + lblCharacterAKA.Text + "<br>Team: ";
            strBody = strBody + strTeam + "<br>Payment Method: " + ddlPaymentType.SelectedItem.Text + "<br>Player Comments: " + tbComment.Text;
            //string EmailAddress = "*****@*****.**";
            //MailMessage mail = new MailMessage(strFrom, EmailAddress);
            //mail.Bcc.Add("*****@*****.**");
            //SmtpClient client = new SmtpClient("smtpout.secureserver.net", 80);
            //client.EnableSsl = false;
            //client.UseDefaultCredentials = false;
            //client.Credentials = new System.Net.NetworkCredential(strFrom, strSMTPPassword);
            //client.Timeout = 10000;
            //mail.Subject = strSubject;
            //mail.Body = strBody;
            //mail.IsBodyHtml = true;

            Classes.cEmailMessageService RegistrationEmail = new Classes.cEmailMessageService();

            try
            {
                //client.Send(mail);
                RegistrationEmail.SendMail(strSubject, strBody, "*****@*****.**", lblPlayerEmail.Text, "", "Registration", Session["Username"].ToString());
            }
            catch (Exception)
            {
                //lblUsernameISEmail.Text = "There was an issue. Please contact us at [email protected] for assistance.";
                //lblUsernameISEmail.Visible = true;
            }
        }
示例#5
0
        protected void NotifyOfNewRegistration()
        {
            string strBody;
            string strSubject = "New Wrathborn event registration - " + lblPlayerName.Text;
            string strTeam    = "";

            if (ddlTeams.SelectedIndex >= 0)
            {
                strTeam = ddlTeams.SelectedItem.Text;
            }
            strBody = lblPlayerName.Text + " has just registered for the upcoming Wrathborn event.  <br>Email: " + lblPlayerEmail.Text + "<br>Character: " + lblCharacterAKA.Text + "<br>Team: ";
            strBody = strBody + strTeam + "<br>Payment Method: " + ddlPaymentType.SelectedItem.Text + "<br>Player Comments: " + tbComment.Text;

            Classes.cEmailMessageService RegistrationEmail = new Classes.cEmailMessageService();

            try
            {
                RegistrationEmail.SendMail(strSubject, strBody, "*****@*****.**", lblPlayerEmail.Text, "", "Registration", Session["Username"].ToString());
            }
            catch (Exception)
            {
            }
        }
示例#6
0
        protected void SendApprovalEmail(int CampaignID, int UserID, int Role, string RequestEmail)
        {
            string strFromUser   = "******";
            string strFromDomain = "larportal.com";
            string strFrom       = strFromUser + "@" + strFromDomain;
            string strTo         = RequestEmail;
            //string strSMTPPassword = "******";
            string strSubject   = "";
            string strBody      = "";
            string CampaignName = "";
            string Username     = "";

            if (Session["Username"] != null)
            {
                Username = Session["Username"].ToString();
            }
            string PlayerFirstName    = ""; // Needs defining - Look up based on UserID
            string PlayerLastName     = ""; // Needs defining
            string PlayerEmailAddress = ""; // Needs defining

            Classes.cCampaignBase Campaign = new Classes.cCampaignBase(CampaignID, "Username", UserID);
            CampaignName = Campaign.CampaignName;
            Classes.cUser UserInfo = new Classes.cUser(Username, "Password");
            PlayerFirstName    = UserInfo.FirstName;
            PlayerLastName     = UserInfo.LastName;
            PlayerEmailAddress = Session["MemberEmailAddress"].ToString();
            switch (Role)
            {
            case 6:
                strSubject = "Request to be a Permanent NPC for " + CampaignName;
                strBody    = "A request to be a permanent NPC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            case 7:
                strSubject = "Request to be an Event NPC for " + CampaignName;
                strBody    = "A request to be an Evnet NPC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            case 8:
                strSubject = "Request to PC " + CampaignName;
                strBody    = "A request to PC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            case 10:
                strSubject = "Request to NPC " + CampaignName;
                strBody    = "A request to NPC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            default:
                break;
            }
            Classes.cEmailMessageService NotifyStaff = new Classes.cEmailMessageService();
            try
            {
                NotifyStaff.SendMail(strSubject, strBody, strTo, "", "", "PointsEmail", Username);
            }
            catch (Exception)
            {
                //lblEmailFailed.Text = "There was an issue. Please contact us at [email protected] for assistance.";
            }
            //MailMessage mail = new MailMessage(strFrom, strTo);
            //SmtpClient client = new SmtpClient("smtpout.secureserver.net", 80);
            //client.EnableSsl = false;
            //client.UseDefaultCredentials = false;
            //client.Credentials = new System.Net.NetworkCredential(strFrom, strSMTPPassword);
            //client.Timeout = 10000;
            //NotifyStaff.SendMail()
            //mail.Subject = strSubject;
            //mail.Body = strBody;
            //mail.IsBodyHtml = true;
            //if (strSubject != "")
            //{
            //    try
            //    {
            //        client.Send(mail);
            //    }
            //    catch (Exception)
            //    {

            //    }
            //}
        }
        protected void SendApprovalEmail(int CampaignID, int UserID, int Role, string RequestEmail)
        {
            string strFromUser   = "******";
            string strFromDomain = "larportal.com";
            string strFrom       = strFromUser + "@" + strFromDomain;
            string strTo         = RequestEmail;
            //string strSMTPPassword = "******";
            string strSubject         = "";
            string strBody            = "";
            string CampaignName       = "";
            string PlayerFirstName    = "";          // Needs defining - Look up based on UserID
            string PlayerLastName     = "";          // Needs defining
            string PlayerEmailAddress = "";          // Needs defining

            Classes.cCampaignBase Campaign = new Classes.cCampaignBase(CampaignID, "Username", UserID);
            CampaignName = Campaign.CampaignName;
            Classes.cUser UserInfo = new Classes.cUser(hidUsername.Value, "Password", Session.SessionID);
            PlayerFirstName    = UserInfo.FirstName;
            PlayerLastName     = UserInfo.LastName;
            PlayerEmailAddress = hidMemberEmailAddress.Value;
            switch (Role)
            {
            case 6:
                strSubject = "Request to be a Permanent NPC for " + CampaignName;
                strBody    = "A request to be a permanent NPC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            case 7:
                strSubject = "Request to be an Event NPC for " + CampaignName;
                strBody    = "A request to be an Evnet NPC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            case 8:
                strSubject = "Request to PC " + CampaignName;
                strBody    = "A request to PC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            case 10:
                strSubject = "Request to NPC " + CampaignName;
                strBody    = "A request to NPC " + CampaignName + " has been received through LARP Portal.  The player information is below.<p></p><p></p>";
                strBody    = strBody + PlayerFirstName + " " + PlayerLastName + "<p></p>" + PlayerEmailAddress + "<p></p><p></p>";
                strBody    = strBody + "Please reply to the player's request within 48 hours.<p></p><p></p>";
                strBody    = strBody + "Thank you<p></p><p></p>LARP Portal staff";
                break;

            default:
                break;
            }
            Classes.cEmailMessageService NotifyStaff = new Classes.cEmailMessageService();
            try
            {
                NotifyStaff.SendMail(strSubject, strBody, strTo, "", "", "PointsEmail", hidUsername.Value);
            }
            catch (Exception)
            {
                //lblEmailFailed.Text = "There was an issue. Please contact us at [email protected] for assistance.";
            }
        }