How do you send an email to yahoo account, can I only send in gmail? I would like to know why, because my ISP does not offer me a POP3 or SMTP address. I do not know anything about mine, if you could tell me how to conduct an investigation, then I will be delighted to be grateful.
SmtpClient smtp = new SmtpClient("smtp.gmail.com", 587);
smtp.UseDefaultCredentials = false;
smtp.Credentials = new NetworkCredential("pevus55@gmail.com", "mypassword");
smtp.EnableSsl = true;
MailAddress mailFrom = new MailAddress("parris797877@yahoo.com");
MailAddress mailTo = new MailAddress("pevus55@gmail.com");
MailMessage msg = new MailMessage(mailFrom, mailTo);
msg.Subject = "Test";
msg.Body = textBox1.Text;
smtp.Send(msg);
source
share