
OUTLOOK 账户 | 1 个月历史 | 网页登录 | OAUTH2 令牌 | 已激活 POP3、IMAP
Seller-provided titleMarketplace cards may show: Outlook 账户| 1 个月历史| 网页登录| Oauth2 令牌| 已激活 Pop3、Imap
发货方式:自动发货
质保期:12 小时
有货92K 有货
$0.00
卖家与配送
| 此产品 | 全部 | |
|---|---|---|
| 平均配送 | 21 分钟 | 48 分钟 |
| 完成率 | 100.0% | 100.0% |
| 争议率 | 0.0% | 0.1% |
| 工单评分 | 8.3% | 6.1% |
| 订单 | 12 | 2852 |
此产品
- 平均配送: 21 分钟
- 完成率: 100.0%
- 争议率: 0.0%
- 工单评分: 8.3%
- 基于 12 个订单
此供应商(所有产品)
- 平均配送: 48 分钟
- 完成率: 100.0%
- 争议率: 0.1%
- 工单评分: 6.1%
- 基于 2852 个订单
选择选项
订单摘要
总计$0.00
- Outlook 账号,质量高。
- 已使用1个月。
- 网页登录正常。
- 寿命很长,可用一年甚至更久。
- 全新账号,未在任何地方使用过,只有你能访问。
- 已启用OAuth2,包含RefreshToken和ClientId。
- 已开启POP3、IMAP。使用OAuth2访问IMAP、POP3。
- 性别男或女。
账号格式:login:password:refresh_token:client_id
重要提示:如果在浏览器登录时提示添加恢复邮箱,直接打开:
https://outlook.live.com/mail/0/
因为已登录,你会直接进入邮箱。只需在同一浏览器中打开该链接即可。
OAuth2 IMAP 邮件读取 Python 示例:
import base64
import imaplib
import poplib
import requests
def get_access_token(client_id, refresh_token):
data = {
'client_id': client_id,
'grant_type': 'refresh_token',
'refresh_token': refresh_token
}
ret = requests.post('https://login.live.com/oauth20_token.srf', data=data)
# 打印响应内容和访问令牌
print(ret.text)
print(ret.json()['access_token'])
return ret.json()['access_token']
# 使用访问令牌生成OAuth2认证字符串
def generate_auth_string(user, token):
auth_string = f"user={user}\1auth=Bearer {token}\1\1"
return auth_string
pop3_server = 'outlook.office365.com'
pop3_port = 995 # POP3 over SSL
def connect_pop3(email, access_token):
server = poplib.POP3_SSL(pop3_server, pop3_port)
# 使用OAuth2进行认证
auth_string = generate_auth_string(email, access_token)
encoded_auth_string = base64.b64encode(auth_string.encode("utf-8")).decode("utf-8")
server._shortcmd(f'AUTH XOAUTH2')
server._shortcmd(f'{encoded_auth_string}')
# 获取邮件列表
num_messages = len(server.list()[1])
print(f"收件箱中有 {num_messages} 封邮件。")
# 获取邮件内容
for i in range(num_messages):
response, lines, octets = server.retr(i + 1)
msg_content = b"\n".join(lines).decode("utf-8")
print(f"邮件 {i + 1}:")
print(msg_content)
print("=" * 50)
def connect_imap(email, access_token):
mail = imaplib.IMAP4_SSL('outlook.office365.com')
# 打印生成的认证字符串
print(generate_auth_string(email, access_token))
mail.authenticate('XOAUTH2', lambda x: generate_auth_string(email, access_token))
mail.select("INBOX")
status, messages = mail.search(None, 'ALL')
print("邮件ID:", messages)
mail.logout()
# 设置邮箱地址和刷新令牌
client_id = 'CLIENT_ID_HERE'
email = "example@hotmail.com"
t = "YOUR_REFRESH_TOKEN_HERE"
# 使用刷新令牌获取访问令牌
acc_token = get_access_token(client_id, t)
# 连接IMAP服务器并访问邮件
connect_imap(email, acc_token)
.
