Error with app send email
The goal is to make a send emails app from c# , later on to also send with attachments but im stuck at this for the past 2 hours
As you can see in the image its saying the error is on line 52
Here is what i have done till now:
line 52 is the line smpt.Send(msg);
Can someone help me why is it saying this?
18 Replies
Are you sure smpt.gmail is right?
Shouldn't it be smtp?
Yeah it should
DNS Resolution is your issue since smpt.gmail.com is not a thing
nslookup is your friend 😄
yeah it was wrong but
it was a variable
so that wouldnt solve the problem
i changed all the smpt to smtp and is saying the same still
Did you correct this line? smpt.Host = "smpt.gmail.com";
its saying that the server SMTP needs one safe connection or the client its not authenticated
after i corrected that its showing me the error above
Okay, now you're running into an authentication issue
So the domain is now properly resolved
You might want to look up whether your authentication procedure is correctly implemented
But it's one step forward from the last issue
i have the correct data, is it possible to be because im sendind an email to myself?
how can i make it to send to hotmail to
It's been a while since I worked with it, but I think if you are working with username & password instead of oauth for authentication, you need to enable "Less secure apps" in your gmail account
That might be your issue
https://myaccount.google.com/lesssecureapps
didnt they remove that option some months ago?
i will check
Not sure, as I said, it's been a while since I used that
yeah its not available again
"This setting is no longer available."
Hmm, I see
WP Mail SMTP
Gmail Is Disabling Less Secure Apps: What To Do Next
Google is deprecating Less Secure Apps. Find out how to fix your Gmail connection in WP Mail SMTP.
I found this
I would assume if they turn it off they must have some kind of migration guide somewhere for people relying on that setting
yeah but i didnt want to use wordpress to send emails
im gonna try and look for App passwords on google settings
Sounds good
Feel free to let me know if that worked, I'd also be interested
wow
option 2
it worked!
Good to know 👌