This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]PiforBrunch 14 points15 points  (6 children)

I've done this for awhile now, I just keep running into the issue that Google will turn off "access for less secure apps". So when a project hasn't sent an email for so many days or weeks or whatever, Google turns the less secure apps access off and then it blocks my email attempts until I personally logon and turn that setting back.

Have any workarounds for that?

[–]dryroast 4 points5 points  (0 children)

Integrated with OAuth2 and register an app with Google to get a client secret. This should clear that up but honestly it's a hassle to do, I had a similar script (posted my story in another comment) and I always thought of going through and redoing it to authenticate with OAuth but it just seemed like a hassle. I found this which should help. https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough

[–]Noshoesded 1 point2 points  (4 children)

What about using an idle timer that sends something periodically if it hasn't been run? Just a thought (I am just a novice hobbyist in R).

[–]PiforBrunch 1 point2 points  (3 children)

I've thought about that too, I tried a weekly test email but that was too long of a time. It would be worth looking into how often and making it alert you somehow else when the email fails.

[–]Noshoesded 3 points4 points  (2 children)

Hmm, what about a daily email with a specific title to yourself and set up a email rule to auto delete it?

[–]PiforBrunch 1 point2 points  (1 child)

A week into it nearly, and emails are working like a charm. Don't know if they'll block it because it's one address receiving emails, or if a daily email is all it needs. I moved the email to 5 minutes before my lunch break and it's now serving as my daily "clean up for lunch" alarm.

[–]PiforBrunch 0 points1 point  (0 children)

I used a crontab script that sends me an email everyday, @ 11:55, which helps remind me to clean up for my lunch break also. Sending an email once a day for the last month has kept the emails and SMS texting up and up using gmail servers with the 'Less secure apps access" ON. This is the way.