Jump to content

Looking for an existing python 3 script running on windows 8 which allows sending emails to my gm...


G+_Rud Dog
 Share

Recommended Posts

Apparently all scripts prior to google changing the access methodology will fail or better stated will allow you to lower secure level on google side to allow your script to function. With out knowing what the implications are for doing such a thing will continue to search for a secure way to send and receive email from google mail.

Hint found since starting this research is they implemented Oauth2 which can't seem to figure out how to use this in a python 3 script.

Link to comment
Share on other sites

I'll try to be clearer: If you're trying to email your Gmail account, you don't need access to the Gmail API. You only need to send an email that doesn't get blocked as spam.

 

This has less to do with Google's security model and more to do with Gmail being useless if people can't email you.

 

My Linkstation NAS sends me a daily report by connecting through smtp.gmail.com port 465 via SMTP over SSL with authentication. It works. No need to provide OAuth credentials or anything besides standard email protocols.

 

There may be a way to avoid authentication credentials by using port 25 (blocked by my ISP), my own ISP's SMTP services (they know I'm on their network, therefore not an open relay,) or create a throw-away Gmail account to avoid storage of your main account's credentials.

 

By all means, pursue the Oauth angle if you prefer but it's not necessary. Short of Google deprecating SMTP as a valid email transit protocol, (not impossible...) my suggested method will continue to work without the need for such dependencies.

Link to comment
Share on other sites

Two questions to you methond:

"My Linkstation NAS sends me a daily report by connecting through smtp.gmail.com port 465 via SMTP over SSL with authentication. It works. No need to provide OAuth credentials or anything besides standard email protocols."

If you could send me a copy of how your python script?

Also have you changed any setting on the google side to lower secure level to get you script to run?

Link to comment
Share on other sites

It's not my python script, it's part of the admin reporting utilities. The script linked above in the bitly link shows how to send a simple SMTP message.

 

I may have had to enable external clients so that I could connect via SMTP. You should be able to confirm that it works by configuring any email client (Thunderbird, any mobile platform's Mail app, Windows Live Mail) with your Gmail account's settings and sending yourself an email.

Link to comment
Share on other sites

 Share

×
×
  • Create New...