using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Text;
public partial class ContactUs : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
System.Threading.Thread.Sleep(1000);
Label12.Text = DateTime.Now.ToString();
// this won't run if the page is not valid
if (Page.IsValid == true)
{
string from = txbEmail.Text;
string to = "support@planeturine.com";
//support@planeturine.com scott@planeturine.com
string subject = "General Contact Form";
string crlf1 = "
";
string crlf2 = "
";
// this creates the email that will be sent to Peter
StringBuilder emailBody = new StringBuilder();
emailBody.AppendFormat("Name: {0}{1}", txbName.Text, crlf1);
emailBody.AppendFormat("Email: {0}{1}", txbEmail.Text, crlf1);
emailBody.AppendFormat("How can we help? {0}{1}", txbAddInfo.Text, crlf2);
// this sends an email to peter
Utilities.SendMail(from.ToString(), to.ToString(), subject.ToString(), emailBody.ToString());
Response.Redirect("http://www.mcssl.com/app/contactsave.asp?MerchantID=66160&defaultar=525518"
+ "&name=" + txbName.Text + "&email1=" + txbEmail.Text
+ "&ARThankyouURL=www.planeturine.com/2010/Success/ContactUs.aspx");
}
}
}