Sending Mail through ASP.NET c#
Sending Mail through ASP.NET c# by using this code of lines
//this code is help to sending emails through ASP.NET c#
// and directly send into inbox not in spam
//Go through some stepsfirst Step
write code in web.config file
<system.net>
< mailSettings >
<smtp from="sender Name">
<network host="mail.Gmail.com" password="Email ID password" userName="sender Email ID" />
</smtp>
</mailSettings>
</system.net>Second Step
//use Necessary library
using System.Web.Mail;third Step
//function to sending mail
//here create a (smtp) object
public void semdMail()
{
//create mail object
MailMessage mail = new MailMessage();
// mail parameters
mail.To = "Receiver EmailID";
mail.From = "Sender Email ID";
mail.Subject = "Subject";
mail.Body = "Message";
SmtpMail.SmtpServer = "localhost";
SmtpMail.Send(mail);
}

Nice Snippets send mails successfully ....
but when i Test this code in my website all mails are received in Spam folder
only want to do is to send mails that will show in the inbox folder in receiver mails.
Thanks in advance.............