Hacker News new | ask | show | jobs
by NKCSS 1999 days ago
You should not ask for a users gmail username and password; there is a way to generate an authentication key for your app that allows the user to revoke the access later as well. I do the same for my mail delivery system.

It's quite easy; here is my C# console app that generates the creds and uses it to send an e-mail. https://imgur.com/a/ZjZUFqS

2 comments

I was worried about the username/password too. Interesting, so you're generating a Client secret and using the Google package to send emails. That snippet helps a lot! Also found the relevant guide for Node.js - https://www.google.com/amp/s/blog.mailtrap.io/send-emails-wi...
Glad I could help :)
Is your C# application source code available somewhere else I can see?