private int SaveToEmailJob(string toEmail)
 {
     EmailBE objEmailBE = new EmailBE();
     EmailDA objEmailDA = new EmailDA();
     objEmailBE.isToEmailRef = false;
     objEmailBE.RequestStatus = "No-delay";
     objEmailBE.RequestType = "Presenter Contact Emailing"; // "Webinar Registrant Emailing";
     objEmailBE.Subject = "Webinar Presenter Contact";
     objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
     objEmailBE.ToEmail = toEmail;
     objEmailBE.FromEmail = Session["EmailID"].ToString();
     objEmailBE.EmailContent = objEmailing.getHTMLFormattedWebinarPresenterContact("Presenter Contact", Convert.ToInt32(hWebinarID.Value));
     return objEmailDA.SaveEmailRequest(objEmailBE);
 }
示例#2
0
        protected void btnReview_Click(object sender, EventArgs e)
        {
            lblError1.Text = "";
            if (txtReviewerEmail.Text.Trim() != "")
            {
                if (objUtil.isEmailsValid(txtReviewerEmail.Text.Trim(), new char[] { ';' }))
                {
                    EmailBE objEmailBE = new EmailBE();
                    EmailDA objEmailDA = new EmailDA();
                    int emlReqID = 0;
                    objEmailBE.isToEmailRef = true;
                    objEmailBE.RequestStatus = "No-delay";
                    objEmailBE.RequestType = "Thank You for registering"; // "Webinar Registrant Emailing";
                    objEmailBE.Subject = "Thank You for registering content for review";         // txtSubject.Text;
                    objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
                    objEmailBE.ToEmail = "";
                    objEmailBE.FromEmail = Session["EmailID"].ToString();
                    objEmailBE.EmailContent = "<b>Following are the content for review</b><br><br>" + redtThankContent.Content;
                    emlReqID = objEmailDA.SaveEmailRequest(objEmailBE);
                    objEmailDA.SaveToEmail(new EmailTo
                                {
                                    EmailRequestID = emlReqID,
                                    ToEmails = txtReviewerEmail.Text.Trim(),
                                    ToType = ""
                                });

                    lblError1.Text = "Emailed to reviewer(s)";
                }
                else
                {
                    lblError1.Text = "One or more entered reviewer's email is invalid";
                }
            }
            else
                lblError1.Text = "Reviewer email(s) is missing";
        }
 private int SaveEmail(string requestType, string subject, string toEmail, string emailContent)
 {
     EmailBE objEmailBE = new EmailBE();
     EmailDA objEmailDA = new EmailDA();
     objEmailBE.isToEmailRef = true;
     objEmailBE.RequestStatus = "No-delay";
     objEmailBE.RequestType = requestType; // "Webinar Registrant Emailing";
     objEmailBE.Subject = subject;         // txtSubject.Text;
     objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
     objEmailBE.ToEmail = toEmail;
     objEmailBE.FromEmail = Session["EmailID"].ToString();
     objEmailBE.EmailContent = emailContent;
     return objEmailDA.SaveEmailRequest(objEmailBE);
 }
 private void UpdateToEmails(List<EmailAddressBO> objEmailAddress, string toType, int requestID)
 {
     StringBuilder strToEmail = new StringBuilder();
     EmailTo objEmailTo = new EmailTo();
     EmailDA objEmailDA = new EmailDA();
     for (int idx = 0; idx < objEmailAddress.Count; idx++)
     {
         strToEmail.Append(objEmailAddress[idx].EmailAddress + ",");
     }
     objEmailTo.EmailRequestID = requestID;
     objEmailTo.ToEmails = strToEmail.ToString();
     objEmailTo.ToType = toType;
     objEmailDA.SaveToEmail(objEmailTo);
 }
示例#5
0
        private int SaveToEmailJob(string emailID)
        {
            EmailBE objEmailBE = new EmailBE();
            EmailDA objEmailDA = new EmailDA();
            EmailApp objEmailing = new EmailApp();

            string emlContent = objEmailing.getHTMLFormattedPasswdChangeNotify(emailID);
            objEmailBE.isToEmailRef = false;
            objEmailBE.RequestStatus = "No-delay";
            objEmailBE.RequestType = "Password Changed";
            objEmailBE.Subject = "Password Changed Notification";
            objEmailBE.SubmittedBy = 0;
            objEmailBE.ToEmail = emailID;
            objEmailBE.FromEmail = "*****@*****.**";
            objEmailBE.EmailContent = emlContent;
            return objEmailDA.SaveEmailRequest(objEmailBE);
        }
示例#6
0
        private int SaveToEmailJob(string emailID, string genPasswd)
        {
            EmailBE objEmailBE = new EmailBE();
            EmailDA objEmailDA = new EmailDA();
            EmailApp objEmailing = new EmailApp();

            string emlContent = objEmailing.getHTMLFormattedNewAccountNotify(emailID, genPasswd, DateTime.Now.ToString());
            objEmailBE.isToEmailRef = false;
            objEmailBE.RequestStatus = "No-delay";
            objEmailBE.RequestType = "New User Account";
            objEmailBE.Subject = "Welcome to SnapSession!";
            objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
            objEmailBE.ToEmail = emailID;
            objEmailBE.FromEmail = "*****@*****.**";
            objEmailBE.EmailContent = emlContent;
            return objEmailDA.SaveEmailRequest(objEmailBE);
        }
示例#7
0
        private void setNotificationDefaults(int webinarID)
        {
            #region email contents
            WebinarNotification objWebNotify = new WebinarNotification();
            objWebNotify.WebinarID = webinarID;
            objWebNotify.isConfirmEmailAllReg = true;
            objWebNotify.RegConfirmEmailContentID = Convert.ToInt32(Constant.RegConfirmContentID);
            objWebNotify.ReminderEmailContentID = Convert.ToInt32(Constant.ReminderContentID);
            objWebNotify.FollowupAEmailContentID = Convert.ToInt32(Constant.AttendeeFollowUpContentID);
            objWebNotify.FollowupNAEmailContentID = Convert.ToInt32(Constant.NonAttendeeFollowUpContentID);
            objWebNotify.InvitationContentID = Convert.ToInt32(Constant.InvitationContentID);
            objWebinarDA.SaveWebinarNotificationDefault(objWebNotify);
            #endregion

            #region Registrant Updates
            EmailDA objEmailDA = new EmailDA();
            RegistrantUpdateBO objRegistrantUpdateBO = new RegistrantUpdateBO();
            objRegistrantUpdateBO.WebinarID = webinarID;
            objRegistrantUpdateBO.IsRegularUpdate = true;
            objRegistrantUpdateBO.IsUpdateWhenRegister = true;
            objRegistrantUpdateBO.UpdateTime = "08:00:00";
            objRegistrantUpdateBO.updateToEmails = Session["EmailID"].ToString();
            objRegistrantUpdateBO.UpdateWeekday = 2;
            objEmailDA.SaveRegistrantUpdate(objRegistrantUpdateBO);
            #endregion

            // Reminder email setting
            RegistrantEmailSettingBO objEmailSetting = new RegistrantEmailSettingBO();

            #region Hour reminder
            objEmailSetting.intervalType = "H";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Reminder Email";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Day reminder
            objEmailSetting.intervalType = "D";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Reminder Email";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Week reminder
            objEmailSetting.intervalType = "W";
            objEmailSetting.intervalValue = 1;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Reminder Email";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Follow-up - Attendees
            objEmailSetting.intervalType = "D";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Follow-up Email - Attended";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Follow-up - Non-Attendees
            objEmailSetting.intervalType = "D";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Follow-up Email - Unattended";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion
        }
 private int SaveToEmailJob(string toEmail, string chkTyp)
 {
     EmailBE objEmailBE = new EmailBE();
     EmailDA objEmailDA = new EmailDA();
     objEmailBE.isToEmailRef = false;
     objEmailBE.RequestStatus = "No-delay";
     objEmailBE.RequestType = hReqType.Value; // "Webinar Registrant Emailing";
     objEmailBE.Subject = chkTyp + " : " + txtSubject.Text;
     objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
     objEmailBE.ToEmail = toEmail;
     objEmailBE.FromEmail = Session["EmailID"].ToString();
     objEmailBE.EmailContent = objEmailing.getFormedEmailContent(redtRemEmail.Content, hReqType.Value, Convert.ToInt32(hWebinarID.Value));
     return objEmailDA.SaveEmailRequest(objEmailBE);
 }
        private int SaveToEmailJob(string toEmail, string reqTyp)
        {
            EmailBE objEmailBE = new EmailBE();
            EmailDA objEmailDA = new EmailDA();
            EmailApp objEmailing = new EmailApp();

            string emlContent = string.Empty;
            string frEmail = string.Empty;
            string subject = string.Empty;
            switch (reqTyp)
            {
                case "Webinar Invitation":
                    int webinarID = Convert.ToInt32(hWebinarID.Value);
                    List<WebinarEmailBE> objWBEmail = new List<WebinarEmailBE>();
                    objWBEmail = objEmailDA.GetWebinarEmail(webinarID, reqTyp);
                    emlContent = objEmailing.getHTMLFormattedEmailContent(objWBEmail[0].EmailContent, objWBEmail[0].RequestType, webinarID);
                    emlContent = objEmailing.getFormedEmailContent(emlContent, reqTyp, webinarID);
                    frEmail = Session["EmailID"].ToString();
                    subject = "Webinar Invitation";
                    break;
                case "Campaign Tracking":
                    emlContent = objEmailing.getHTMLFormattedGeneralEmail(reqTyp, Convert.ToInt32(Session["Client_LanguageID"]));
                    frEmail = "*****@*****.**";
                    subject = "SnapSession Webinar Campaign Tracking";
                    break;
                case "Connect Your Registration":
                    emlContent = objEmailing.getHTMLFormattedGeneralEmail(reqTyp, Convert.ToInt32(Session["Client_LanguageID"]));
                    frEmail = "*****@*****.**";
                    subject = "SnapSession Connect Your Registration";
                    break;
            }

            objEmailBE.isToEmailRef = false;
            objEmailBE.RequestStatus = "No-delay";
            objEmailBE.RequestType = reqTyp;
            objEmailBE.Subject = subject;
            objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
            objEmailBE.ToEmail = toEmail;
            objEmailBE.FromEmail = frEmail;
            objEmailBE.EmailContent = emlContent;
            return objEmailDA.SaveEmailRequest(objEmailBE);
        }
示例#10
0
        protected void btnSendEmail_Click(object sender, EventArgs e)
        {
            lblError.Text = "";
            if (txtSubject.Text == "" || redEmailRegistrants.Content == "")
                lblError.Text = "Subject or email content cannot be empty";
            else
            {
                if (chkDidNotAttend.Checked || chkAttended.Checked || chkAttendedLive.Checked ||
                      chkOnDemand.Checked || chkRegistered.Checked)
                {
                    lblError.Text = "";
                    EmailBE objEmailBE = new EmailBE();
                    EmailDA objEmailDA = new EmailDA();
                    //objEmailBE.isToEmailRef = true;
                    //objEmailBE.RequestStatus = "Queued";
                    //objEmailBE.RequestType = "Webinar Registrant Emailing";
                    //objEmailBE.Subject = txtSubject.Text;
                    //objEmailBE.SubmittedBy = Convert.ToInt32(Session["UserID"]);
                    //if (txtSendMeEmailAddress.Text != "")
                    //    objEmailBE.ToEmail = txtSendMeEmailAddress.Text;
                    //objEmailBE.FromEmail = Session["EmailID"].ToString();
                    //objEmailBE.EmailContent = redEmailRegistrants.Content;
                    //int requestID = objEmailDA.SaveEmailRequest(objEmailBE);

                    int requestID = SaveEmail("Webinar Registrant Emailing", txtSubject.Text.Trim(), txtSendMeEmailAddress.Text.Trim(), redEmailRegistrants.Content);
                    if (requestID != 0)
                    {
                        List<EmailAddressBO> objEmailAddress = new List<EmailAddressBO>();
                        if (chkDidNotAttend.Checked)
                        {
                            objEmailAddress = objEmailDA.GetToEmailAddress(Convert.ToInt32(hWebinarID.Value), "NOTATTENDED");
                            UpdateToEmails(objEmailAddress, "Email Registrant - NotAttended", requestID);
                        }
                        if (chkAttended.Checked)
                        {
                            objEmailAddress = objEmailDA.GetToEmailAddress(Convert.ToInt32(hWebinarID.Value), "ATTENDED");
                            UpdateToEmails(objEmailAddress, "Email Registrant - Attended", requestID);
                        }
                        if (chkAttendedLive.Checked)
                        {
                            objEmailAddress = objEmailDA.GetToEmailAddress(Convert.ToInt32(hWebinarID.Value), "LIVE");
                            UpdateToEmails(objEmailAddress, "Email Registrant - Attended Live", requestID);
                        }
                        if (chkOnDemand.Checked)
                        {
                            objEmailAddress = objEmailDA.GetToEmailAddress(Convert.ToInt32(hWebinarID.Value), "ONDEMAND");
                            UpdateToEmails(objEmailAddress, "Email Registrant - Attended Ondemand", requestID);
                        }
                        if (chkRegistered.Checked)
                        {
                            objEmailAddress = objEmailDA.GetToEmailAddress(Convert.ToInt32(hWebinarID.Value), "REGISTERED");
                            UpdateToEmails(objEmailAddress, "Email Registrant - All registered", requestID);
                        }

                        lblError.Text = "Successfully emailed to selected registrant group";
                        lblError.CssClass = "msgSuccess";
                    }
                }
                else
                {
                    lblError.Text = "At least one registration group has to be selected";
                }
            }
        }