Closed jgamedev closed 8 years ago
You're right. I introduced a bug in the latest version (v131), I will try to fix asap. Thanks for filing the issue!
Embarrassing. It is now fixed, thanks again. Use pip install -U yagmail
to get the latest version (v132) going.
It works!! Email is sent and sky kittens are happy again.
But it printed this to the command line, is it expected?
2016-03-25 22:32:17 [yagmail] [ERROR] : Sending as text email since
lxml
is not installed
That doesn't look friendly. The idea is that everything will be HTML emails, with automatically an alternative view for just pure "text email" readers. You can also force sending pure text emails. But actually, HTML is nice :)
This error message is about the fact that lxml
would like to try to parse the text as html, but it cannot, since it is not installed.
What I realise is that it would be better to use a builtin HTML parser not to have it as a dependency; created an issue (https://github.com/kootenpv/yagmail/issues/35). In your case, you can do 2 things. Ignore the error and only send text emails (note that you can then not use
contents="<h1>Title here</h1> Body here <a href="http://example.com"> Link here </a>"
Or install lxml
which is a great module on its own.
Sorry for the inconvenience.
Cool, thank you so much for the fast response and for making this available to the community.
I removed lxml
as a requirement!
Ran this code and got the dreadful SMTPAuthenticationError:
If I replace the contents of the file with plain smtplib code, it works great: http://pastie.org/private/f4vbuy9ivcioqiutwbg
Ouch!! Now somebody tell me why :-)
Disclamer: Evrything has been taken care on gmail side to allow access, that's why smtplib works, btw