using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Data.SqlClient;
using System.Text;
using System.IO;
public partial class inquiry : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void sbt_Click(object sender, EventArgs e)
{
StringBuilder mailcontent2 = new StringBuilder("<div style='width: 600px; background-color :#ffffff;font-family :Arial;'><center><h3>Query | Dehradun Taxi Hire</h3></center>");
mailcontent2.Append("<table width='800' align='center' style='background-color:#ffffff; color:#000000;' border='1px'>");
mailcontent2.Append("<tr><td><font size='2'>Name </td> <td><font size='2'> " + txt1.Text + " </font></td> </tr>");
mailcontent2.Append("<tr><td><font size='2'>Period </td> <td><font size='2'>From " + TextBox1.Text + " </font></td> </tr>");
mailcontent2.Append("<tr><td><font size='2'>Phone </td> <td><font size='2'> " + TextBox2.Text + " </font></td> </tr>");
mailcontent2.Append("<tr><td><font size='2'>Message</font></td> <td><font size='2'> " + TextBox3.Text + " </font></td> </tr> </table> ");
System.Net.Mail.MailMessage mailMessage2 = new System.Net.Mail.MailMessage(TextBox1.Text, "[email protected]"); mailMessage2.Body = Convert.ToString(mailcontent2);
mailMessage2.Subject = "Dehradun Taxi Hire - Inquiry";
mailMessage2.IsBodyHtml = true;
System.Net.Mail.SmtpClient mailClient3 = new System.Net.Mail.SmtpClient();
System.Net.NetworkCredential basicAuthenticationInfo2 = new System.Net.NetworkCredential("[email protected]", "i(Zzx%IdK{5"); mailClient3.Host = "216.224.185.13";
mailClient3.UseDefaultCredentials = false;
mailClient3.Credentials = basicAuthenticationInfo2;
mailClient3.Send(mailMessage2);
string strScript = "alert('Thank you for your inquiry; we will get back to you within 12 hours.');";
Page.ClientScript.RegisterStartupScript(this.GetType(), "alertBox", strScript, true);
}
}