質問

import imaplib
M=imaplib.IMAP4_SSL('imap.gmail.com', 993)

when run on my pc it works and alls fine, but on server it returns: 'module' object has no attribute 'IMAP4_SSL'

well this module clearly needs that attribute. any clue?

役に立ちましたか?

解決

IMAP4_SSL is only present if Python's ssl module is available (you can test with import ssl). Try upgrading your server's python version, and/or installing the ssl module.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top