SMTP not working

Post your Gambas programming questions here.
Post Reply
User avatar
sadams54
Posts: 139
Joined: Monday 9th July 2018 3:43am
Contact:

SMTP not working

Post 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.
User avatar
cogier
Site Admin
Posts: 1118
Joined: Wednesday 21st September 2016 2:22pm
Location: Guernsey, Channel Islands

Re: SMTP not working

Post 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"
User avatar
jornmo
Site Admin
Posts: 224
Joined: Wednesday 21st September 2016 1:19pm
Location: Norway

Re: SMTP not working

Post by jornmo »

That was my first thought too.
Post Reply