You can try this.
static void Main(string[] args)
{
SmtpMail oMail = new SmtpMail("TryIt");
SmtpClient oSmtp = new SmtpClient();
oMail.From = "myid@yahoo.com";
oMail.To = "support@emailarchitect.net";
oMail.Subject = "test email from yahoo account";
oMail.TextBody = "this is a test email sent from c# project with yahoo.";
SmtpServer oServer = new SmtpServer("smtp.mail.yahoo.com");
oServer.User = "myid@yahoo.com";
oServer.Password = "yourpassword";
oServer.Port = 465;
oServer.ConnectType = SmtpConnectType.ConnectSSLAuto;
try
{
Console.WriteLine("start to send email over SSL ...");
oSmtp.SendMail(oServer, oMail);
Console.WriteLine("email was sent successfully!");
}
catch (Exception ep)
{
Console.WriteLine("failed to send email with the following error:");
Console.WriteLine(ep.Message);
}
}
If this don't help you somehow you can check
here