❔ Getting error with sending an email in C# using gmail's smtp server.
Hi everyone. So I wanted to learn how to send an email using C# and I keep getting this error. I doubt it is something to do with my code and it might be a problem with my google account or something else. Nevertheless, I'll still send it here incase there is a problem in my code.
Here is the code:
This is the error message I am getting:
I've searched everywhere and every solution I try doesn't seem to work, so I've come here to see if there is any answer I can get. I've been working on this for about 2 hours so if you can, please send a solution ASAP.
6 Replies
The error message is the one all the way at the bottom and the code is the first picture. Sorry for the weird message format if that makes sense.
i think Google stops allowing connections like that
Stack Overflow
Send an email without having to enable less secure apps in google
I made an e-mailer in C#, but you have to enable less secure apps in google. Is there a way around this? If not, how do other apps send e-mails securely without being classified as a less-secure ap...
basically make a new OAuth client and use the key and client ID
Oh alright. I'll look into that. Thanks for the help, I'll let you know if there is any problem doing that.
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.