Advertisement
Guest User

Untitled

a guest
Aug 13th, 2017
651
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. So I've got this working with Hotmail and Gmail, no problem. With Yahoo, though, it gets an error. I've searched already and haven't found my answer. I'm hoping someone could come here and help me figure this out.
  2. Here's the code :
  3. Dim smtp As New SmtpClient
  4. Dim mail As New MailMessage
  5. smtp.Credentials = New Net.NetworkCredential("Username@yahoo.com", "password")
  6. smtp.Port = 465
  7. smtp.Host = "smtp.mail.yahoo.com"
  8. smtp.EnableSsl = True
  9. mail.Subject = "test"
  10. mail.Body = "test"
  11. mail.To.Add("Username@yahoo.com")
  12. mail.From = New MailAddress("Username@yahoo.com")
  13. smtp.Send(mail)
  14.  
  15. I don't see what's wrong with it, and the error I'm getting is : Failure sending mail.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement