imap访问163邮箱

近期尝试通过imap读取163邮箱

import imaplib
import email

#连接到QQ邮箱的IMAP服务器
imap_server = 'imap.163.com'
imap_port = 993
imap_user = 'xxxx@163.com'
map_password = 'xxxx'

imap = imaplib.IMAP4_SSL(imap_server, imap_port)
print(imap.welcome)
#登录邮箱
imap.login(imap_user, map_password)
print(imap.welcome)

运行后,IMAP4_SSL访问163服务已经可以,但是imap.login一直提示登录失败imaplib.IMAP4.error: b’LOGIN Login error or password error’

反复用账号和密码登录163邮箱是没有问题,这里还有哪里有问题?是需要设置什么?

讨论数量: 4
Jason990420

要在163邮箱中开启IMAP服务器,首先需要登录到邮箱账户。登录后,点击页面右上角的“设置”按钮,选择“POP3/SMTP/IMAP”选项。在接下来的页面中,找到“IMAP/SMTP服务”部分,点击“开启”按钮。系统会弹出提示框,要求用户通过手机验证码或邮箱安全码进行身份验证。完成验证后,IMAP服务即成功开启。

www.hellopms.com/it/5259.html

Check your account credentials: Make sure that you are using the correct username and password, and that they are entered correctly. If you are using an app password, make sure that you are using the correct app password, and not your regular account password.

1个月前 评论
yisuoyuyan (楼主) 1个月前
Jason990420 (作者) 1个月前

开启imap服务后,通过授权码登录邮箱

1个月前 评论

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!