Closed xThuby closed 8 years ago
...BITCH!',
that comma should not be there.Other than that, nothing comes to mind... did you ever get it working? Try upgrading yagmail (pip install -U yagmail), and perhaps try both python2 and python3.
I followed all your advice (Except trying python2 since I've never used it before, and I don't have pip (Or whatever it is) for python2 so it doesn't recognize yagmail) I'm still getting the same error.
Here's the sourcecode with all of your suggested changes.
#!/usr/bin/env python3
import yagmail
from hackerutils import get_dotenv
dotenv = get_dotenv()
GMAIL_USERNAME = dotenv['GMAIL_USERNAME']
GMAIL_PASSWORD = dotenv['GMAIL_PASSWORD']
def main():
yag = yagmail.SMTP(GMAIL_USERNAME)
yag.send(
'oliver.252@hotmail.com',
'testing',
'This is a fucking test you BITCH!'
)
if __name__ == '__main__':
main()
Edit: Yagmail is freshly installed so everything is up to date. Still not working.
Found out the problem. It was the dotenv[GMAIL_PASSWORD]
where things went wrong. Just removed that and now it works like a charm!
Getting error mentioned in title. Someone please help.
code: