Sending email via gmail & python

前端 未结 7 631
走了就别回头了
走了就别回头了 2020-11-30 22:52

What is the recommended way of sending emails with gmail and python?

There are a lot of SO threads, but most are old and also smtp with username & password is n

相关标签:
7条回答
  • 2020-11-30 23:19

    thanks, @Guillame, @apadana. @Guillaume's answer worked great for me in Win/Python3.7, but with one change. For the all the 3 print statements, I had to remove the "f", as in change:

    print (f'An error occurred: {error}')
    

    to

    print ('An error occurred: {error}')
    

    Also look at the first part of @apandana's answer to get your client_secret.json file. That was more clearer for me.

    0 讨论(0)
提交回复
热议问题