Monday, April 2, 2012

Can Use the Code for using that Gmail Server on your .aspx.cs page

Suppose you have taken a Text Field name as   TextBox1 to accepting the Email ID. We need to search the email ID at our Customer table " tblcustomer " and will send the correspondence Password to the Email ID When Some one Click on the  " ForgetPwd " Button........

protected void ForgetPwdButton3_Click(object sender, EventArgs e)
{

string id = TextBox1.Text;
string sql = "select password from tblcustomer where customer_email='" + email+ "'";
con.Open();
SqlCommand cmd = new SqlCommand(sql, con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{

// GmailSender gs = new GmailSender();
string pwd = dr[0].ToString();
  if (SendMail("sender mail id", "sender pw", id, pwd))
{
Response.Write("<script language='javascript'>alert('Password has been sent to your email ID');</script>");
TextBox1.Text = "";
}
}
else
{
Response.Write("<script language='javascript'>alert('You have Entered wrong email ID');</script>");
}
}

NICE MAIL SERVER CODE for asp .net bt GMAIL SERVER...

This code you can use for Forget Password/ Mailing Form....Etc


public bool SendMail(string gMailAccount, string password, string to, string subject)
{
try
{
//Attachment mailAttachment = new Attachment(getfile);
NetworkCredential loginInfo = new NetworkCredential(gMailAccount, password);
MailMessage msg = new MailMessage();
msg.From = new MailAddress(gMailAccount);
msg.To.Add(new MailAddress(to));
msg.Subject = "Gifttoindia.co.in Password has been received";
msg.Body = "Your password is: " + subject;
msg.IsBodyHtml = true;
//msg.Attachments.Add(mailAttachment);
SmtpClient client = new SmtpClient("smtp.gmail.com");
client.EnableSsl = true;
client.UseDefaultCredentials = false;
client.Credentials = loginInfo;
client.Send(msg);

return true;
}
catch (Exception)
{
return false;
}

}

Saturday, October 16, 2010

Whats the meaning Of Search Engine sites?

When anybody tells about Search Engine sites, some of sites names like Google, yahoo comes first in our brain. But there are many search Engine sites in this world besides them..like Bingo, Ask, Msn, Alta Vista, Hotbot, Excite, Aol, Alexa, Lycos, Rediff(India), Indiatimes (India), Alleba (philipines), Baidu (China), Duam (Korea), Rambler (Russia), Onkosh (Arabic), Sesam (Norway), Onet (Poland)..Etc. Since Google and yahoo have absorbed the large number of users in the Internet market,  they have become very popular on Internet Search Engine Field. And another Important thing is 85% users find sites through Search Engine.

Search Engine sites means from where internet user can get any information on world wide web. That means to search about any thing on a search engine site, we can get more information about that if the term is listed in that search engine site's index from any or some websites in the world wide web.

             
        All Search Engine sites have only one motto that is how fast and how-much accurate and How much more information they can gather according to user's searching. And In that case Google has strong techniques to pick up any sites to it's index list quickly than other search engine sites. For this reason, Google shows more result for the searching words than others and also become very popular. Near about 65 percent user feels comfortable and reliable to search on Google.