how to reset the keyring of stored email password in Visual Studio Code in Windows with yagmail?

1.5k views Asked by At

I'm using knockknock to email myself when training a model is complete.

I am using VS Code. The first time I use the @email_sender(recipient_emails=email_address), it prompted me for a password, which I typed in the wrong one. Unfortunately VS Code stores the password in a keyring, and I cannot figure out how to reset this value. How to reset the password stored in the keyring?

VS Code apparently only prompts you for your email password the FIRST time you use knockknock's @email_sender decorator, but every time after that, VS Code does NOT prompt for the password, so I have no way to adjust/fix the password to the right one.

How to reset the stored password in the keyring? I think knockknock uses the yagmail library

1

There are 1 answers

0
Ana On

It took me a while but I eventually found the solution:

import keyring

# to show the set password
print(keyring.get_password("yagmail", "your_email"))

# to change to the current password
keyring.set_password("yagmail", "your_email", "new_password")