-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: No module named 'twisted.mail.smtp' #2375
Comments
|
@duangy , thanks for reporting. |
|
I confirm having the same issue on the latest scrapy on python 3.5. @redapple , so, before twisted will fix that issue, what is the proper way of sending email reports from scrapy on python 3+ installations? Thank you. |
|
@MrLokans I think you can use smtplib and email packages from standard library; see https://docs.python.org/3/library/email-examples.html. They are blocking though - it means that all processing will stop while email is waiting to be sent. So make sure sending is fast: run a local daemon (exim, postfix) and use it to send emails, so that when you call "send email" the message is put to a local queue, and then daemon handles the rest. Using e.g. gmail smtp interface directly is worse because it can be much slower. |
|
@kmike Thanks a lot for the reply. |
|
hmm .. learnt something today |
|
@redapple I've gone ahead and merged twisted/twisted#509 . |
|
Someone knows if this issue is fixed? i'm using python 3.5, twisted 17.1.0, scrapy 1.3.0 and still can't use email service. |
|
I submitted #2671 |
|
@rodrigc , I tested your patch with (today's) Twisted trunk (commit 0aef33642cbe04cac558a4aaceeb2a6a03de403b), and with Python 3.5 I needed to patch it further like this to make scrapy work for sending emails (for example sending crawl stats with The The other one about converting the challenge response to bytes before base64 encoding it, I'm not sure it's the best place for it. I'll let you find a proper way. (Otherwise, without that with |
|
Hey @RobinDavid , with Twisted 17.9, I think #2671 is sufficient (but it isn't merged) |
I use scrapy in python3.5, when I try to send a mail by MailSender, it's crashed.
The text was updated successfully, but these errors were encountered: