hi, i want to make an email application through c# n i have debugging error on
"client.Send(mail);"
n em using this code
"using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Net.Mail;
namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
SmtpClient client= new SmtpClient("smtp.gmail.com");
client.UseDefaultCredentials = true;
MailMessage mail = new MailMessage();
client.EnableSsl = true;
client.Credentials = new System.Net.NetworkCredential("tousifshaikh.91@gmail.com", "shaikh91");
mail.To.Add(new MailAddress("tousifshaikh.91@gmail.com"));
mail.From = new MailAddress( "tousifshaikh.91@gmail.com");
mail.Subject = "subject";
mail.Body = "body";
client.Port = 587;
client.Send(mail);
}
}
}
" can any 1 help me plz