kootenpv / yagmail

Send email in Python conveniently for gmail using yagmail
MIT License
2.66k stars 265 forks source link

bash: yagmail.register('username', 'password'): command not found #57

Closed j10sanders closed 7 years ago

j10sanders commented 8 years ago

I've tried two methods to get the password out of my code:

yagmail.register('username@gmail.com', 'password) that gives bash: syntax error near unexpected token `'username@gmail.com',' I looked up this error and added quotation marks because of this: http://askubuntu.com/questions/372926/bash-syntax-error-near-unexpected-token

So I now have: yagmail.register"('username@gmail.com', 'password" that gives bash: yagmail.register('username@gmail.com', 'password'): command not found

Any ideas what I can change to do better here?

kootenpv commented 8 years ago

You have a lot of typos in your command here... could you please check again your syntax?

Could you try to see what happens when you do pip install keyring?

j10sanders commented 8 years ago

Requirement already satisfied...

For now, I'm using sparkpost, but I would like to get yagmail set up.

kootenpv commented 8 years ago

Ah wait a minute... you have to run that command in python. It seems like you're running it in bash.

Type python. Then run import yagmail. Only then run yagmail.register('username@gmail.com', 'password').

macloo commented 7 years ago

I struggled with this too! I suggest you change the README to say:

Start the Python interpreter. Then import yagmail:

import yagmail

And then enter:

yagmail.register('mygmailusername', 'mygmailpassword')

kootenpv commented 7 years ago

@macloo Thanks for taking the time to post about your struggle. I updated the README. Is it now clearer?