Page 1 of 1

SMTP not working

Posted: Monday 16th July 2018 3:07am
by sadams54
You guys are great, helped me solve last problem easy. now this one please. I get an error using smtpclient that says "unable to send recipients, sender rejected" using the code below..

Dim M As New SmtpClient

m.Host = "smtp.mail.yahoo.com"
m.To.Add("mail@txt.att.net")
m.Port = 465
m.From = "Kitchen Timer"
m.Subject = "This is a test"
m.Body = "Testes"
m.User = "user"
m.Password = "password"
m.Encrypt = Net.SSL

m.Send

the mail info is correct and authenticates. Any good help appreciated.

Re: SMTP not working

Posted: Monday 16th July 2018 8:46am
by cogier
Try changing m.From and m.User to your email address. e.g.
m.From = "me@yahoo.com"
m.User = "me@yahoo.com"

Re: SMTP not working

Posted: Monday 16th July 2018 9:39am
by jornmo
That was my first thought too.