protected void mensajeOper(int codigo, string id_solicitud) { Usuario musuario = new UsuarioBC().GetUsuario((string)(Session["usrname"])); MailBCA mBCA = new MailBCABC().getMailbycodigo(codigo); string ccopia = mBCA.Ccopy; string[] body = mBCA.Body.Split('.'); Mail.Mail mail = new Mail.Mail(); StringBuilder strBody = new StringBuilder(); strBody.Append("<html><head><title>Correo Automatico</title><body>"); strBody.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"); strBody.Append("<tr><td>"); foreach (string item in body) { strBody.AppendLine("<br/>"); strBody.AppendLine(item); } strBody.AppendLine(""); strBody.Append("</td></tr>"); strBody.Append("<tr><td>"); strBody.AppendLine("<br/>"); strBody.AppendLine("Atte.,"); strBody.AppendLine("<br/>"); strBody.AppendLine(mBCA.Firma); strBody.Append("</td></tr><tr><td>"); strBody.Append("<IMG SRC=" + "http://190.196.121.53/imagenes/firmaCA.jpg" + ">"); strBody.Append("</td></tr></table>"); strBody.Append("</body></html>"); mail.SendMail(musuario.Correo, mBCA.Ccopy, mBCA.Subject.Replace("NOperacion", id_solicitud), strBody.ToString().Replace("NOperacion", id_solicitud)); }
void AdminMailer(string BookingID, string Name, string Play, string TotalAmount, string TotalSeats, string DateOfBooking, string ShowDate, string Category, string EmailID, string ReferenceNo, string Mobile, string address) { Mail.Mail objMail = new Mail.Mail(); Mail.MailData objmaildata = new Mail.MailData(); objmaildata.from = ConfigurationManager.AppSettings["FromMail"]; objmaildata.fromName = ""; objmaildata.to = ConfigurationManager.AppSettings["ToMail"]; objmaildata.toName = ""; objmaildata.subject = "Refund Acknowledgement"; string BodyMaggage = "<div>" + "<p>Dear Sir ,<br/></p>" + "<p>Payment was successfully Reversed for the customer " + Name + " <br/></p>" + "<p>Follwoing are details of the customer :<br/><br/></p>" + "<p>Booking Id : " + BookingID + "<br/></p>" + "<p>Reference Id : " + ReferenceNo + "</p>" + "<p>Amount Refunded : " + TotalAmount + "<br/></p>" + "<p>No. of Tickets : " + TotalSeats + "<br/></p>" + "<p>Show : " + Play + "<br/></p>" + "<p>Category : " + Category + "<br/></p>" + "<p>Date of Booking : " + DateOfBooking + "<br/></p>" + "<p>Show Date : " + ShowDate + "<br/></p>" + "<p>Customer Name : " + Name + "<br/></p>" + "<p>Email Address : " + EmailID + "<br/></p>" + "<p>Address : " + address + "<br/></p>" + "<p>Mobile No. : " + Mobile + "<br/><br/></p>" + "<p>With Regards<br/></p>" + "<p>Kingdom of Dreams Team</p>" + "<p>Gurgaon</p>" + "</div>" ; objmaildata.bodyMessage = BodyMaggage; objMail.sendMail_Net(objmaildata); }
//public void TraceService(string content) //{ // //set up a filestream // FileStream fs = new FileStream(@"d:/HDFC.txt", FileMode.OpenOrCreate, FileAccess.Write); // //set up a streamwriter for adding text // StreamWriter sw = new StreamWriter(fs); // //find the end of the underlying filestream // sw.BaseStream.Seek(0, SeekOrigin.End); // //add the text // sw.WriteLine(content); // //add the text to the underlying filestream // sw.Flush(); // //close the writer // sw.Close(); //} /// <summary> /// Mailer Function /// Mail in Case of Successful Refund /// </summary> /// <param name="args"></param> void CustomerMailer(string BookingID, string Name, string Play, string TotalAmount, string TotalSeats, string DateOfBooking, string ShowDate, string Category, string EmailID) { Mail.Mail objMail = new Mail.Mail(); Mail.MailData objmaildata = new Mail.MailData(); objmaildata.from = ConfigurationManager.AppSettings["FromMail"]; objmaildata.fromName = "KOD"; objmaildata.to = EmailID; objmaildata.toName = Name; objmaildata.subject = "Refund Acknowledgement"; string BodyMaggage = "<div>" + "<p>Dear " + Name + " ,<br/></p>" + "<p>Due to some technical reason's your payment was deducted from the account but your " + Play + " shows tickets were not booked.<br/></p>" + "<p>So,We have refunded the amount of Rs. " + TotalAmount + " to your account.<br/></p>" + "<p>Booking Id : " + BookingID + "<br/></p>" + "<p>Amount Refunded : " + TotalAmount + "<br/></p>" + "<p>No. of Tickets : " + TotalSeats + "<br/></p>" + "<p>Show : " + Play + "<br/></p>" + "<p>Category : " + Category + "<br/></p>" + "<p>Date of Booking : " + DateOfBooking + "<br/></p>" + "<p>Show Date : " + ShowDate + "<br/><br/></p>" + "<p>Sorry for inconvenience<br/></p>" + "<p>With Regards<br/></p>" + "<p>Kingdom of Dreams Team</p>" + "<p>Gurgaon</p>" + "</div>" ; objmaildata.bodyMessage = BodyMaggage; objMail.sendMail_Net(objmaildata); }
protected void mensajeOper(int codigo, string id_solicitud) { MailBCA mBCA = new MailBCABC().getMailbycodigo(codigo); Operacion op = new OperacionBC().getoperacion(Convert.ToInt32(id_solicitud)); string ccopia = mBCA.Ccopy; Agenda agn = new AgendaBC().getAgenda(Convert.ToInt32(id_solicitud)); //Usuario eject = new UsuarioBC().GetUsuario(agn.Ejecutivo); Persona pers = new PersonaBC().getpersonabyrut(agn.Rut_persona); string[] body = mBCA.Body.Split('.'); Mail.Mail mail = new Mail.Mail(); StringBuilder strBody = new StringBuilder(); strBody.Append("<html><head><title>Correo Automatico</title><body>"); strBody.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"); strBody.Append("<tr><td>"); foreach (string item in body) { strBody.AppendLine("<br/>"); strBody.AppendLine(item); } strBody.AppendLine("<br/>"); strBody.AppendLine("Se Frimaron los siguientes Creditos"); strBody.AppendLine("<br/>"); strBody.AppendLine("<table whidth=\"70px\">"); foreach (GridViewRow row in grdCreditos.Rows) { string idref; string idinterno; idref = row.Cells[0].Text; idinterno = row.Cells[1].Text; CheckBox chkF = (CheckBox)row.Cells[2].FindControl("chkfirma"); if (chkF.Checked) { strBody.Append("<tr><td aling=\"Center\">"); strBody.AppendLine(idinterno); strBody.Append("</td></tr>"); } } strBody.AppendLine("</table>"); strBody.Append("</td></tr>"); strBody.Append("<tr><td>"); strBody.AppendLine("<br/>"); strBody.AppendLine("Atte.,"); strBody.AppendLine("<br/>"); strBody.AppendLine(mBCA.Firma); strBody.Append("</td></tr><tr><td>"); strBody.Append("<IMG SRC=" + "http://190.196.121.53/imagenes/firmaCA.jpg" + ">"); strBody.Append("</td></tr></table>"); strBody.Append("</body></html>"); //op.Usuario.Correo mail.SendMail(op.Usuario.Correo, mBCA.Ccopy, mBCA.Subject.Replace("NOperacion", id_solicitud), strBody.ToString().Replace("NOperacion", id_solicitud).Replace("NombreCliente", pers.Nombre + " " + pers.Apellido_paterno + " " + pers.Apellido_materno)); }
protected void mensajeOper(int codigo, string id_solicitud) { Usuario musuario = new UsuarioBC().GetUsuario((string)(Session["usrname"])); MailBCA mBCA = new MailBCABC().getMailbycodigo(codigo); EstadoOperacion mobservacion = new EstadooperacionBC().getEstadobycodigoestado(Convert.ToInt32(id_solicitud), 123); Usuario musuarioComercial = new UsuarioBC().GetUsuario(cbo_EjeCom.SelectedValue); string ccopia = mBCA.Ccopy; if (codigo == 4) { ccopia = ccopia + ";" + musuarioComercial.Correo; } string[] body = mBCA.Body.Split('.'); Mail.Mail mail = new Mail.Mail(); StringBuilder strBody = new StringBuilder(); strBody.Append("<html><head><title>Correo Automatico</title><body>"); strBody.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">"); strBody.Append("<tr><td>"); foreach (string item in body) { strBody.AppendLine("<br/>"); strBody.AppendLine(item.Replace("XX:XX", lbl_hora.Text)); } strBody.Append("<tr><td>"); strBody.AppendLine("OBS.: " + mobservacion.Observacion); strBody.Append("</td></tr>"); strBody.AppendLine(""); strBody.Append("</td></tr>"); strBody.Append("<tr><td>"); strBody.AppendLine("<br/>"); strBody.AppendLine("Atte.,"); strBody.AppendLine("<br/>"); strBody.AppendLine(mBCA.Firma); strBody.Append("</td></tr><tr><td>"); strBody.Append("<IMG SRC=" + "http://190.196.121.53/imagenes/firmaCA.jpg" + ">"); strBody.Append("</td></tr></table>"); strBody.Append("</body></html>"); mail.SendMail(musuario.Correo, mBCA.Ccopy, mBCA.Subject.Replace("NOperacion", id_solicitud), strBody.ToString().Replace("XX:XX", lbl_hora.Text).Replace("NOperacion", id_solicitud)); }
public void UpdateV2(Mail.Mail mail) { mailBox.Add(mail); mailBox.CleanUp(); }
public void Update(Mail.Mail mail) { mailBox.Add(mail); }
public void UpdateTemp(Mail.Mail mail, long currentBlockIndex) { mailBox.Add(mail); mailBox.CleanUpTemp(currentBlockIndex); }
void AdminMailer(string BookingID, string Name, string Play, string TotalAmount, string TotalSeats, string DateOfBooking, string ShowDate, string Category, string EmailID, string ReferenceNo,string Mobile,string address) { Mail.Mail objMail = new Mail.Mail(); Mail.MailData objmaildata = new Mail.MailData(); objmaildata.from = ConfigurationManager.AppSettings["FromMail"]; objmaildata.fromName = ""; objmaildata.to = ConfigurationManager.AppSettings["ToMail"]; objmaildata.toName = ""; objmaildata.subject = "Refund Acknowledgement"; string BodyMaggage = "<div>" + "<p>Dear Sir ,<br/></p>" + "<p>Payment was successfully Reversed for the customer " + Name +" <br/></p>" + "<p>Follwoing are details of the customer :<br/><br/></p>" + "<p>Booking Id : " + BookingID + "<br/></p>" + "<p>Reference Id : " + ReferenceNo + "</p>" + "<p>Amount Refunded : " + TotalAmount + "<br/></p>" + "<p>No. of Tickets : " + TotalSeats + "<br/></p>" + "<p>Show : " + Play + "<br/></p>" + "<p>Category : " + Category + "<br/></p>" + "<p>Date of Booking : " + DateOfBooking + "<br/></p>" + "<p>Show Date : " + ShowDate + "<br/></p>" + "<p>Customer Name : " + Name + "<br/></p>" + "<p>Email Address : " + EmailID + "<br/></p>" + "<p>Address : " + address + "<br/></p>" + "<p>Mobile No. : " + Mobile + "<br/><br/></p>" + "<p>With Regards<br/></p>" + "<p>Kingdom of Dreams Team</p>" + "<p>Gurgaon</p>" + "</div>" ; objmaildata.bodyMessage = BodyMaggage; objMail.sendMail_Net(objmaildata); }
//public void TraceService(string content) //{ // //set up a filestream // FileStream fs = new FileStream(@"d:/HDFC.txt", FileMode.OpenOrCreate, FileAccess.Write); // //set up a streamwriter for adding text // StreamWriter sw = new StreamWriter(fs); // //find the end of the underlying filestream // sw.BaseStream.Seek(0, SeekOrigin.End); // //add the text // sw.WriteLine(content); // //add the text to the underlying filestream // sw.Flush(); // //close the writer // sw.Close(); //} /// <summary> /// Mailer Function /// Mail in Case of Successful Refund /// </summary> /// <param name="args"></param> void CustomerMailer(string BookingID, string Name, string Play, string TotalAmount, string TotalSeats, string DateOfBooking, string ShowDate, string Category, string EmailID) { Mail.Mail objMail = new Mail.Mail(); Mail.MailData objmaildata = new Mail.MailData(); objmaildata.from = ConfigurationManager.AppSettings["FromMail"]; objmaildata.fromName = "KOD"; objmaildata.to = EmailID; objmaildata.toName = Name; objmaildata.subject = "Refund Acknowledgement"; string BodyMaggage = "<div>" + "<p>Dear "+ Name +" ,<br/></p>" + "<p>Due to some technical reason's your payment was deducted from the account but your " + Play + " shows tickets were not booked.<br/></p>" + "<p>So,We have refunded the amount of Rs. " + TotalAmount + " to your account.<br/></p>" + "<p>Booking Id : " + BookingID + "<br/></p>" + "<p>Amount Refunded : " + TotalAmount + "<br/></p>" + "<p>No. of Tickets : " + TotalSeats + "<br/></p>" + "<p>Show : " + Play + "<br/></p>" + "<p>Category : " + Category + "<br/></p>" + "<p>Date of Booking : " + DateOfBooking + "<br/></p>" + "<p>Show Date : " + ShowDate + "<br/><br/></p>" + "<p>Sorry for inconvenience<br/></p>" + "<p>With Regards<br/></p>" + "<p>Kingdom of Dreams Team</p>" + "<p>Gurgaon</p>" + "</div>" ; objmaildata.bodyMessage = BodyMaggage; objMail.sendMail_Net(objmaildata); }