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 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); }
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); }
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); }
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); }