3

I've managed to get my tiny little app to send an email with a click of a button using this code (this is just the email part): http://pastebin.com/nR5g28ct

But to avoid some error, I had to allow less secure apps in my account using the steps seen on this google support page. Gmail told me that's kind of bad thing, so I was wondering, is it really unsafe to do this? I was thinking about adding receiving emails also, but now I'm not so sure and I deleted my info from my source code even though it's just on my laptop and no one else has access to it (paranoid much?).

5

I ran into the same issue when using a Ruby gmail gem.

According to this post, "less secure apps" directly handle your credentials, rather than using something like OAuth that verifies your identity without exposing your credentials to the app. Given that your app is running locally on your machine (and you hopefully trust it!) this shouldn't be a problem.

  • Thanks for the input. In the meantime I set up 2 step verification on my gmail acc, and generated app password for my python app. That seemed like a good idea, since now I'm logging to my gmail acc with this generated pass (which I think Google is keeping safe) and my laptop is mine only so unless it get's stolen, I think I'll be fine. – Luka Jul 21 '15 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.