public void Email()
        {
            try
            {
                CPT_EmailTemplate registrationEmail = new CPT_EmailTemplate();
                registrationEmail.Name = "Onboard";
                registrationEmail.To   = new List <string>();
                registrationEmail.To.Add("*****@*****.**");
                //registrationEmail.ToUserName = new List<string>();
                //registrationEmail.ToUserName.Add("Anshuman");
                registrationEmail.JOINER       = name;
                registrationEmail.BASELOCATION = location;
                registrationEmail.DOJ          = doj;
                registrationEmail.DESIGNATION  = desig;
                registrationEmail.EMAIL        = eml;
                registrationEmail.PHONE        = phn;
                registrationEmail.REPORTINGMGR = rmgr;

                TokenMessageTemplate valEmail = new TokenMessageTemplate();
                valEmail.SendEmail(registrationEmail);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
 public void sendConfirmation(string name, string mail, string RequesterEmail, string account, DateTime startDate, DateTime endDate)
 {
     try
     {
         CPT_EmailTemplate registrationEmail = new CPT_EmailTemplate();
         registrationEmail.Name = "AlignedResource";
         registrationEmail.To   = new List <string>();
         registrationEmail.To.Add(mail);
         registrationEmail.ToUserName = new List <string>();
         registrationEmail.ToUserName.Add(name);
         registrationEmail.CC = new List <string>();
         registrationEmail.CC.Add(RequesterEmail);
         registrationEmail.STARTDATE = startDate.ToShortDateString().ToString();
         registrationEmail.ENDDATE   = endDate.ToShortDateString().ToString();
         registrationEmail.ACCOUNT   = account;
         //registrationEmail.UID = lstdetils[0].EmployeeMasterID.ToString();
         TokenMessageTemplate valEmail = new TokenMessageTemplate();
         valEmail.SendEmail(registrationEmail);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
         //lblResult.Text = "Your message failed to send, please try again.";
     }
 }
Example #3
0
        public void Email(string RequestID, int Status)
        {
            try
            {
                List <CPT_ResourceMaster> lstdetils = new List <CPT_ResourceMaster>();
                lstdetils = (List <CPT_ResourceMaster>)Session["UserDetails"];
                string employeeEmailID = lstdetils[0].Email;

                CPT_EmailTemplate registrationEmail = new CPT_EmailTemplate();
                if (Status == 23)
                {
                    registrationEmail.Name   = "DropResourceRequest";
                    registrationEmail.STATUS = requestID;
                }
                else
                {
                    registrationEmail.Name = "UpdateResourceDemand";
                }
                registrationEmail.To = new List <string>();
                registrationEmail.To.Add(employeeEmailID);
                registrationEmail.ToUserName = new List <string>();
                registrationEmail.ToUserName.Add(lstdetils[0].EmployeetName);
                //registrationEmail.UID = lstdetils[0].EmployeeMasterID.ToString();
                TokenMessageTemplate valEmail = new TokenMessageTemplate();
                valEmail.SendEmail(registrationEmail);
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
 public void Email()
 {
     try
     {
         string            mail = ReleaseResourcesBL.getEmailIdByEmpID(resourceID);
         string            name = ReleaseResourcesBL.getNameByEmpID(resourceID);
         CPT_EmailTemplate registrationEmail = new CPT_EmailTemplate();
         registrationEmail.Name = "DeployResource";
         registrationEmail.To   = new List <string>();
         registrationEmail.To.Add(mail);
         registrationEmail.CC = new List <string>();
         registrationEmail.CC.Add(RequesterEmailID);
         registrationEmail.ToUserName = new List <string>();
         registrationEmail.ToUserName.Add(name);
         registrationEmail.PROJECT   = acName;
         registrationEmail.PROCESS   = prName;
         registrationEmail.STARTDATE = startDate;
         registrationEmail.ENDDATE   = endDate;
         TokenMessageTemplate valEmail = new TokenMessageTemplate();
         valEmail.SendEmail(registrationEmail);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #5
0
 public void Email(string RequestID, string Status)
 {
     try
     {
         List <CPT_ResourceMaster> lstdetils = new List <CPT_ResourceMaster>();
         lstdetils = (List <CPT_ResourceMaster>)Session["UserDetails"];
         List <string>     data = AllocateBL.getRequestDetails(RequestID);
         CPT_EmailTemplate registrationEmail = new CPT_EmailTemplate();
         registrationEmail.Name = "RequestAction";
         registrationEmail.To   = new List <string>();
         registrationEmail.To.Add(data[0]);
         registrationEmail.ToUserName = new List <string>();
         registrationEmail.ToUserName.Add(data[1]);
         registrationEmail.PROJECT = data[2];
         registrationEmail.PROCESS = data[3];
         registrationEmail.STATUS  = Status;
         registrationEmail.STATOR  = lstdetils[0].EmployeetName;
         TokenMessageTemplate valEmail = new TokenMessageTemplate();
         valEmail.SendEmail(registrationEmail);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #6
0
 public void Email()
 {
     try
     {
         CPT_EmailTemplate registrationEmail = new CPT_EmailTemplate();
         registrationEmail.Name = "DeclinedOffer";
         registrationEmail.To   = new List <string>();
         registrationEmail.To.Add("*****@*****.**");
         registrationEmail.ToUserName = new List <string>();
         registrationEmail.ToUserName.Add("Anshuman");
         registrationEmail.JOINER = name;
         TokenMessageTemplate valEmail = new TokenMessageTemplate();
         valEmail.SendEmail(registrationEmail);
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
 }
Example #7
0
        protected void btnAccountRecovery_Click(object sender, EventArgs e)
        {
            if (!string.IsNullOrEmpty(txtAccountRecovery.Text.Trim()))
            {
                ClsAuthentication         clsUserRegistration = new ClsAuthentication();
                CPT_EmailTemplate         registrationEmail   = new CPT_EmailTemplate();
                List <CPT_ResourceMaster> lstuserDetails      = new List <CPT_ResourceMaster>();
                lstuserDetails = clsUserRegistration.getDetailsforPasswordRecovery(txtAccountRecovery.Text.Trim());
                if (lstuserDetails.Count > 0)
                {
                    try
                    {
                        registrationEmail.Name = "ForgetPassword";
                        registrationEmail.To   = new List <string>();
                        registrationEmail.To.Add(txtAccountRecovery.Text);
                        registrationEmail.ToUserName = new List <string>();
                        registrationEmail.ToUserName.Add(lstuserDetails[0].EmployeetName);
                        registrationEmail.UID = lstuserDetails[0].EmployeeMasterID.ToString();
                        TokenMessageTemplate valEmail = new TokenMessageTemplate();
                        valEmail.SendEmail(registrationEmail);
                        //btnAccountRecovery.Visible = false;
                        lblMessage.Visible      = true;
                        txtAccountRecovery.Text = string.Empty;
                        lblMessage.ForeColor    = System.Drawing.Color.Green;
                        lblMessage.Text         = "<strong  class='text - center'>If you have registered previously we have sent you a verification email, for password resetting click on that link. If you do not see it in your inbox please note that your email provider may have mistaken us as spam. If no email has arrived please try again.</strong>";
                        Response.AppendHeader("Refresh", "10;url=Login.aspx");
                        //Response.Redirect("Login.aspx");
                    }

                    catch (Exception ex)
                    {
                        Console.WriteLine(ex.Message);
                    }
                }
                else
                {
                    lblMessage.ForeColor = System.Drawing.Color.Red;
                    lblMessage.Visible   = true;
                    lblMessage.Text      = "   Email not found...";
                }
            }
        }