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.Net.Mail;
public partial class AR_inner_Mail : System.Web.UI.Page
{
//DBAccess.DBAccess ClSqlCmd;
public void Page_Load(object sender, EventArgs e)
{
//ClSqlCmd = new DBAccess.DBAccess(System.Configuration.ConfigurationSettings.AppSettings["SE_ConnectionString"]);
///////////////////////////////////////////////////////////////////////////
if (!Page.IsPostBack)
{
//GetData();
}
}
void GetData()
{
// DataSet DS = ClSqlCmd.DataSetSel(@"
// SELECT
// [ModuleStyle_ID]
// ,[" + Request.Params["T"].Trim().Replace("'", "''") + @"_TextStyle_ID]
// FROM [dbo].[__StandardEngine_T_ModuleStyles]
// where
// [Module_ID]=" + System.Configuration.ConfigurationSettings.AppSettings["SE_ModuleID"]);
// if (DS.Tables.Count > 0 && DS.Tables[0].Rows.Count > 0)
// {
// DataSet DS_Sub = new DataSet();
// if (DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_TextStyle_ID"] != Convert.DBNull)
// {
// #region Get Data
// DS_Sub = ClSqlCmd.DataSetSel(@"
// SELECT
// [ForeColor]
// ,[BackColor]
// ,[FontFamily]
// ,[FontSize]
// ,[Align]
// ,[Bold]
// ,[Underline]
// ,[Italic]
// FROM [dbo].[__StandardEngine_T_TextStyle]
// where
// [TextStyle_ID]=" + DS.Tables[0].Rows[0][Request.Params["T"].Trim().Replace("'", "''") + "_TextStyle_ID"].ToString());
// #endregion
// #region Set Data
// if (DS_Sub.Tables.Count > 0 && DS_Sub.Tables[0].Rows.Count > 0)
// {
// if (DS_Sub.Tables[0].Rows[0]["Italic"] != Convert.DBNull)
// cb_Italic.Checked = DS_Sub.Tables[0].Rows[0]["Italic"].ToString().ToLower() == "italic" ? true : false;
// }
// #endregion
// }
// }
}
protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
string str_Msg = "";
//str_Msg += "Service:" + ddl_Service.Value +"
";
str_Msg += "Name:" + txt_Name.Text + "
";
str_Msg += "eMail:" + txt_eMail.Text + "
";
//str_Msg += "Mobile:" + txt_Mobile.Text + "
";
str_Msg += "Comment:" + txt_Comment.Text + "
";
bool bool_Mail_Success = true;
try
{
MailMessage mail = new MailMessage();
mail.From = new MailAddress(System.Configuration.ConfigurationSettings.AppSettings["SE_Domain"]);
mail.To.Add(System.Configuration.ConfigurationSettings.AppSettings["SE_Email"]);
mail.Subject = "رسالة من الموقع " + System.Configuration.ConfigurationSettings.AppSettings["SE_Domain"];
mail.IsBodyHtml = true;
mail.Body = str_Msg;
SmtpClient smtp = new SmtpClient();
smtp.Host = "relay-hosting.secureserver.net";
smtp.Send(mail);
}
catch
{
bool_Mail_Success = false;
td_Mail_ErrorMsg.InnerHtml = "";
}
if (bool_Mail_Success)
{
td_Mail_ErrorMsg.InnerHtml = "";
td_Mail_ErrorMsg.InnerHtml = "";
//Label1.Visible = true;
}
}
}