Closed loraxman closed 7 years ago
I'll test this on a Ubuntu VM and let you know. Thanks for filing!
Using Python 3.4 and Ubuntu 14.10, I can not reproduce.
What could be the thing is that perhaps you are not consistent with what you've saved? A username (e.g. kootenpv) would be stored differently as an emailaddress (e.g. kootenpv@gmail.com). Both can be used to login (if missing @..., it will add @gmail.com).
However, if you've saved it in one style, it does not work for the other. Could that be the case?
Let me know if there is anything else that you could think that has to do with it.
i too have this issue! steps to reproduce
.yagmail
file should be in $HOME directory. Is it? Make sure that the .yagmail
file just contains the username.
Let me know if you'd like me to add a "do you want to save a .yagmail file?" after the question whether or not to save in keyring.
do i need to give a terminating end line in the yagfile?
No need for it. Make sure the username of gmail is in .yagmail
, not the username on the PC. Hopefully that helps.
You can actually test by using "yagmail" command on the command line to see if it worked (if it works, no prompt, and it should send an email to yourself without subject and without contents)
it turns out that the username of PC and gmail are the same!
So did it work in the end?
Hello, I have the same problem on a Debian system (Raspberry Pi). He always asks for a Keyring Key to decrypt the Keyring file where the password is stored in. I have installed the keyrings.alt backend. I have not found a solution to store this password, so that it is dragged automatically.
@GeorgHo Perhaps it could work to just put the password in the script in that occasion then?
Hi kootenpv, I solved the problem by entered the login data in the script. Now everything works fine!
@GeorgHo Great to hear, good luck!
@GeorgHo even i did the same to make it work, but it defeats the purpose of securing your username and password. anyone who can view your script can see your username => you can't share your script!
@murtraja I'm thinking OAuth2 is the only way to solve running the script in an automated way without having to use keyring or password in script, and without compromising security. What do you think?
The only reason I am using yagmail is because it DOES NOT use Oauth2. Reason being it screws up my automation email sending sometimes.!. That said, if you have already decided, try not to replace, make it like add on. Thanks On 5 Mar 2016 15:39, "Pascal van Kooten" notifications@github.com wrote:
@murtraja https://github.com/murtraja I'm thinking OAuth2 is the only way to solve running the script in an automated way without having to use keyring or password in script, and without compromising security. What do you think?
— Reply to this email directly or view it on GitHub https://github.com/kootenpv/yagmail/issues/16#issuecomment-192616138.
I do have the same issue on Debian (Raspberry Pi). I do have a .yagmail file in my home with just my gmail login (without @gmail.com)
when running python3 test_mail.py it asks me the keyring pwd and then succesfully send the email.
I tried adding or removing my login in the yagmail.SMTP() call but it does not change anything.
Any1 found a way to solve this ?
Tyvm all.
Oauth2 support has been added as of https://github.com/kootenpv/yagmail/commit/22cb687adc67fd9b16f870e5e658a3fa77ca67ac
This should be the way forward.
After registering the user and email, it prompts everytime for the encrypted keyring password. yag = yagmail.SMTP() Please enter password for encrypted keyring:
Works fine on Mac Os