I want to send an email from a windows aplication using my yahoo account.
I got some help before but still it's not working.
The code is:
MailMessage msg;
MailAddress msender, receiver;
SmtpClient client;
msender = new MailAddress(tfrom.Text); // pa***@yahoo.com
receiver = new MailAddress(tto.Text);
msg = new MailMessage(msender,receiver);
msg.Subject = tsubject.Text;
msg.Body = @"this is a test";
client = new SmtpClient("smtp.mail.yahoo.com");
client.Credentials = new NetworkCredential("Pablo","mypassword");
try
{
client.Send(msg);
}
catch (Exception e1)
{
MessageBox.Show(e1.Message);
}
................
......................
It looks like the problem is with NetworkCredential, any help is very
apreciated.
TIA