AzurLaneAutoScript
AzurLaneAutoScript copied to clipboard
stmp推送不支持SMTP AUTH
在提问之前...
- [X] 我已经搜索了现有的 issues
- [X] 我在提问题之前至少花费了 5 分钟来思考和准备
- [X] 我已经阅读了 Wiki 中的 常见问题(FAQ)
- [X] 我正在使用最新版的 Alas
描述你的问题
使用outlook的邮箱作为发信邮箱,发送时报错ValueError: SMTP AUTH extension not supported by server.
已在其他程序内测试邮箱设置可以正常发送邮件
日志里的隐私信息已打码 ~~直接输出账号密码这真的好吗~~
如何复现
- 将推送设置为outlook邮箱
- 触发alas报错
- 出现问题
预期行为
正常发送邮件
相关 Logs
ERROR 01:40:18.599 │ ValueError: SMTP AUTH extension not supported by server.
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ │
│ E:\桌面\AzurLaneAutoScript\alas.py:63 in run │
│ │
│ 61 │ │ try: │
│ 62 │ │ │ self.device.screenshot() │
│ ❱ 63 │ │ │ self.__getattribute__(command)() │
│ 64 │ │ │ return True │
│ 65 │ │ except TaskEnd: │
│ │
│ ╭───────────────────────────── locals ─────────────────────────────╮ │
│ │ command = 'restart' │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x000001A486644B08> │ │
│ ╰──────────────────────────────────────────────────────────────────╯ │
│ E:\桌面\AzurLaneAutoScript\alas.py:161 in restart │
│ │
│ 159 │ def restart(self): │
│ 160 │ │ from module.handler.login import LoginHandler │
│ ❱ 161 │ │ LoginHandler(self.config, device=self.device).app_restar │
│ 162 │ │
│ 163 │ def start(self): │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ LoginHandler = <class 'module.handler.login.LoginHandler'> │ │
│ │ self = <alas.AzurLaneAutoScript object at │ │
│ │ 0x000001A486644B08> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\handler\login.py:160 in app_restart │
│ │
│ 158 │ │ │ self.device.app_stop() │
│ 159 │ │ self.device.app_start() │
│ ❱ 160 │ │ self.handle_app_login() │
│ 161 │ │ # self.ensure_no_unfinished_campaign() │
│ 162 │ │ self.config.task_delay(server_update=True) │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ self = <module.handler.login.LoginHandler object at │ │
│ │ 0x000001A4880DB508> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\handler\login.py:129 in │
│ handle_app_login │
│ │
│ 127 │ │ │ self.device.click_record_clear() │
│ 128 │ │ │ try: │
│ ❱ 129 │ │ │ │ self._handle_app_login() │
│ 130 │ │ │ │ return True │
│ 131 │ │ │ except (GameTooManyClickError, GameStuckError) as e: │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ _ = 2 │ │
│ │ self = <module.handler.login.LoginHandler object at │ │
│ │ 0x000001A4880DB508> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\handler\login.py:37 in │
│ _handle_app_login │
│ │
│ 35 │ │ │
│ 36 │ │ while 1: │
│ ❱ 37 │ │ │ self.device.screenshot() │
│ 38 │ │ │ if not login_success and orientation_timer.reached() │
│ 39 │ │ │ │ # Screen may rotate after starting an app │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ confirm_timer = Timer(limit=6.726/1.5, count=0/4) │ │
│ │ login_success = False │ │
│ │ orientation_timer = Timer(limit=7.558/5, count=2/0) │ │
│ │ self = <module.handler.login.LoginHandler object at │ │
│ │ 0x000001A4880DB508> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\device\device.py:62 in screenshot │
│ │
│ 60 │ │ """ │
│ 61 │ │ self.stuck_record_check() │
│ ❱ 62 │ │ super().screenshot() │
│ 63 │ │ if self.handle_night_commission(): │
│ 64 │ │ │ super().screenshot() │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ __class__ = <class 'module.device.device.Device'> │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000001A484741608> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\base\timer.py:11 in function_timer │
│ │
│ 9 │ │ t0 = time.time() │
│ 10 │ │ │
│ ❱ 11 │ │ result = function(*args, **kwargs) │
│ 12 │ │ t1 = time.time() │
│ 13 │ │ print('%s: %s s' % (function.__name__, str(round(t1 - t0 │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ args = ( │ │
│ │ │ <module.device.device.Device object at │ │
│ │ 0x000001A484741608>, │ │
│ │ ) │ │
│ │ function = <function Screenshot.screenshot at 0x000001A4B6B7EEE8> │ │
│ │ kwargs = {} │ │
│ │ t0 = 1662572412.3883927 │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\device\screenshot.py:53 in │
│ screenshot │
│ │
│ 51 │ │ │ │ self.screenshot_adb │
│ 52 │ │ │ ) │
│ ❱ 53 │ │ │ self.image = method() │
│ 54 │ │ │ │
│ 55 │ │ │ if self.config.Emulator_ScreenshotDedithering: │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ _ = 0 │ │
│ │ method = <bound method Uiautomator2.screenshot_uiautomator2 of │ │
│ │ <module.device.device.Device object at │ │
│ │ 0x000001A484741608>> │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000001A484741608> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\device\method\uiautomator_2.py:87 in │
│ retry_wrapper │
│ │
│ 85 │ │ │
│ 86 │ │ logger.critical(f'Retry {func.__name__}() failed') │
│ ❱ 87 │ │ raise RequestHumanTakeover │
│ 88 │ │
│ 89 │ return retry_wrapper │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ _ = 0 │ │
│ │ args = () │ │
│ │ func = <function Uiautomator2.screenshot_uiautomator2 at │ │
│ │ 0x000001A4B6AE1D38> │ │
│ │ init = None │ │
│ │ kwargs = {} │ │
│ │ self = <module.device.device.Device object at │ │
│ │ 0x000001A484741608> │ │
│ │ sleep = True │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────╯
RequestHumanTakeover
During handling of the above exception, another exception occurred:
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\site-packages\onepush\providers │
│ \smtp.py:72 in _prepare_url │
│ │
│ 70 │ │ # self._server.set_debuglevel(1) │
│ 71 │ │ try: │
│ ❱ 72 │ │ │ self._server.login(user=user, password=password) │
│ 73 │ │ except smtplib.SMTPException as e: │
│ 74 │ │ │ self._server.close() │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ host = 'smtp.office365.com' │ │
│ │ kwargs = { │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> RequestHumanTakeover' │ │
│ │ } │ │
│ │ password = '打码' │ │
│ │ port = 587 │ │
│ │ s = <class 'smtplib.SMTP'> │ │
│ │ self = <onepush.providers.smtp.SMTP object at │ │
│ │ 0x000001A4B6EF80C8> │ │
│ │ ssl = None │ │
│ │ user = '打码' │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\smtplib.py:697 in login │
│ │
│ 695 │ │ if not self.has_extn("auth"): │
│ 696 │ │ │ raise SMTPNotSupportedError( │
│ ❱ 697 │ │ │ │ "SMTP AUTH extension not supported by server.") │
│ 698 │ │ │
│ 699 │ │ # Authentication methods the server claims to support │
│ │
│ ╭───────────────────────────── locals ──────────────────────────────╮ │
│ │ initial_response_ok = True │ │
│ │ password = '打码' │ │
│ │ self = <smtplib.SMTP object at 0x000001A4B6EFAD48> │ │
│ │ user = '打码' │ │
│ ╰───────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────╯
SMTPNotSupportedError: SMTP AUTH extension not supported by server.
The above exception was the direct cause of the following exception:
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ │
│ E:\桌面\AzurLaneAutoScript\module\notify.py:36 in handle_notify │
│ │
│ 34 │ │ │ │ ) │
│ 35 │ │ │
│ ❱ 36 │ │ notifier.notify(**config) │
│ 37 │ except OnePushException: │
│ 38 │ │ logger.exception("Push notify failed") │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ _config = 'provider: smtp\nhost: smtp.office365.com │ │
│ │ # smtp 服务器地址\nuser: 打码.'+208 │ │
│ │ config = { │ │
│ │ │ 'host': 'smtp.office365.com', │ │
│ │ │ 'user': '打码', │ │
│ │ │ 'password': '打码', │ │
│ │ │ 'port': 587, │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> RequestHumanTakeover' │ │
│ │ } │ │
│ │ e = ValueError(SMTPNotSupportedError('SMTP AUTH │ │
│ │ extension not supported by server.')) │ │
│ │ item = { │ │
│ │ │ 'provider': 'smtp', │ │
│ │ │ 'host': 'smtp.office365.com', │ │
│ │ │ 'user': '打码', │ │
│ │ │ 'password': '打码', │ │
│ │ │ 'port': 587 │ │
│ │ } │ │
│ │ key = 'password' │ │
│ │ kwargs = { │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> RequestHumanTakeover' │ │
│ │ } │ │
│ │ notifier = <onepush.providers.smtp.SMTP object at │ │
│ │ 0x000001A4B6EF80C8> │ │
│ │ provider_name = 'smtp' │ │
│ │ required = ['host', 'user', 'password'] │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\site-packages\onepush\core.py:7 │
│ 9 in notify │
│ │
│ 77 │ │
│ 78 │ def notify(self, **kwargs): │
│ ❱ 79 │ │ self._prepare_url(**kwargs) │
│ 80 │ │ self._prepare_data(**kwargs) │
│ 81 │ │ return self._send_message() │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ kwargs = { │ │
│ │ │ 'host': 'smtp.office365.com', │ │
│ │ │ 'user': '打码', │ │
│ │ │ 'password': '打码', │ │
│ │ │ 'port': 587, │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> RequestHumanTakeover' │ │
│ │ } │ │
│ │ self = <onepush.providers.smtp.SMTP object at │ │
│ │ 0x000001A4B6EF80C8> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\site-packages\onepush\providers │
│ \smtp.py:75 in _prepare_url │
│ │
│ 73 │ │ except smtplib.SMTPException as e: │
│ 74 │ │ │ self._server.close() │
│ ❱ 75 │ │ │ raise ValueError(e) from e │
│ 76 │ │
│ 77 │ def _prepare_data( │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ host = 'smtp.office365.com' │ │
│ │ kwargs = { │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> RequestHumanTakeover' │ │
│ │ } │ │
│ │ password = '打码' │ │
│ │ port = 587 │ │
│ │ s = <class 'smtplib.SMTP'> │ │
│ │ self = <onepush.providers.smtp.SMTP object at │ │
│ │ 0x000001A4B6EF80C8> │ │
│ │ ssl = None │ │
│ │ user = '打码' │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────╯
ValueError: SMTP AUTH extension not supported by server.
截图
No response
还有别的吗?
推送设置:
provider: smtp host: smtp.office365.com user: 打码 password: 打码 port: 587
这或许不是alas的问题?
非标准 smtpssl(465) 端口需要手动在配置里指定ssl: true
不使用ssl连接到ssl端口的时候在国内几个邮箱上我遇到的情况是会直接卡住,不过我没有等它报错(
我没用过outlook,可以先试试指定ssl。 至于直接输出密码的问题实际上不太好解决,目前考虑是加一个debug字段控制报错是否输出
非标准 smtpssl(465) 端口需要手动在配置里指定
ssl: true
不使用ssl连接到ssl端口的时候在国内几个邮箱上我遇到的情况是会直接卡住,不过我没有等它报错(我没用过outlook,可以先试试指定ssl。 至于直接输出密码的问题实际上不太好解决,目前考虑是加一个debug字段控制报错是否输出
开启后还是报错,下面是日志:
`
ERROR 12:47:00.356 │ SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number
(_ssl.c:1076)
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ │
│ E:\桌面\AzurLaneAutoScript\alas.py:63 in run │
│ │
│ 61 │ │ try: │
│ 62 │ │ │ self.device.screenshot() │
│ ❱ 63 │ │ │ self.getattribute(command)() │
│ 64 │ │ │ return True │
│ 65 │ │ except TaskEnd: │
│ │
│ ╭───────────────────────────── locals ─────────────────────────────╮ │
│ │ command = 'commission' │ │
│ │ self = <alas.AzurLaneAutoScript object at 0x000002BCCFA95A88> │ │
│ ╰──────────────────────────────────────────────────────────────────╯ │
│ E:\桌面\AzurLaneAutoScript\alas.py:184 in commission │
│ │
│ 182 │ def commission(self): │
│ 183 │ │ from module.commission.commission import RewardCommissio │
│ ❱ 184 │ │ RewardCommission(config=self.config, device=self.device) │
│ 185 │ │
│ 186 │ def tactical(self): │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ RewardCommission = <class │ │
│ │ 'module.commission.commission.RewardCommission… │ │
│ │ self = <alas.AzurLaneAutoScript object at │ │
│ │ 0x000002BCCFA95A88> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\commission\commission.py:492 in run │
│ │
│ 490 │ │ │ out: page_commission │
│ 491 │ │ """ │
│ ❱ 492 │ │ self.ui_ensure(page_reward) │
│ 493 │ │ self.commission_receive() │
│ 494 │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ self = <module.commission.commission.RewardCommission object at │ │
│ │ 0x000002BCFFC51408> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\ui\ui.py:295 in ui_ensure │
│ │
│ 293 │ │ """ │
│ 294 │ │ logger.hr("UI ensure") │
│ ❱ 295 │ │ self.ui_get_current_page(skip_first_screenshot=skip_firs │
│ 296 │ │ if self.ui_current == destination: │
│ 297 │ │ │ logger.info("Already at %s" % destination) │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ destination = <module.ui.page.Page object at │ │
│ │ 0x000002BC804E6408> │ │
│ │ self = <module.commission.commission.RewardCommi… │ │
│ │ object at 0x000002BCFFC51408> │ │
│ │ skip_first_screenshot = True │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\module\ui\ui.py:214 in ui_get_current_page │
│ │
│ 212 │ │ logger.warning('Supported page: Any page with a "HOME" b │
│ upper-right') │
│ 213 │ │ logger.critical("Please switch to a supported page befor │
│ ❱ 214 │ │ raise GamePageUnknownError │
│ 215 │ │
│ 216 │ def ui_goto(self, destination, offset=(30, 30), confirm_wait │
│ skip_first_screenshot=True): │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ app_check = <function run_once.
During handling of the above exception, another exception occurred:
╭────────────────── Traceback (most recent call last) ───────────────────╮
│ │
│ E:\桌面\AzurLaneAutoScript\module\notify.py:36 in handle_notify │
│ │
│ 34 │ │ │ │ ) │
│ 35 │ │ │
│ ❱ 36 │ │ notifier.notify(**config) │
│ 37 │ except OnePushException: │
│ 38 │ │ logger.exception("Push notify failed") │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ _config = 'provider: smtp\nhost: smtp.office365.com │ │
│ │ # smtp 服务器地址\nuser: 打码.'+206 │ │
│ │ config = { │ │
│ │ │ 'host': 'smtp.office365.com', │ │
│ │ │ 'user': '打码', │ │
│ │ │ 'password': '打码', │ │
│ │ │ 'port': 587, │ │
│ │ │ 'ssl': True, │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> GamePageUnknownError' │ │
│ │ } │ │
│ │ e = SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong │ │
│ │ version number (_ssl.c:1076)') │ │
│ │ item = { │ │
│ │ │ 'provider': 'smtp', │ │
│ │ │ 'host': 'smtp.office365.com', │ │
│ │ │ 'user': '打码', │ │
│ │ │ 'password': '打码', │ │
│ │ │ 'port': 587, │ │
│ │ │ 'ssl': True │ │
│ │ } │ │
│ │ key = 'password' │ │
│ │ kwargs = { │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> GamePageUnknownError' │ │
│ │ } │ │
│ │ notifier = <onepush.providers.smtp.SMTP object at │ │
│ │ 0x000002BC800C2248> │ │
│ │ provider_name = 'smtp' │ │
│ │ required = ['host', 'user', 'password'] │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\site-packages\onepush\core.py:7 │
│ 9 in notify │
│ │
│ 77 │ │
│ 78 │ def notify(self, **kwargs): │
│ ❱ 79 │ │ self._prepare_url(**kwargs) │
│ 80 │ │ self._prepare_data(**kwargs) │
│ 81 │ │ return self._send_message() │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ kwargs = { │ │
│ │ │ 'host': 'smtp.office365.com', │ │
│ │ │ 'user': '打码', │ │
│ │ │ 'password': '打码', │ │
│ │ │ 'port': 587, │ │
│ │ │ 'ssl': True, │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> GamePageUnknownError' │ │
│ │ } │ │
│ │ self = <onepush.providers.smtp.SMTP object at │ │
│ │ 0x000002BC800C2248> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\site-packages\onepush\providers │
│ \smtp.py:69 in _prepare_url │
│ │
│ 67 │ │ │ │ ssl = True │
│ 68 │ │ s = smtplib.SMTP_SSL if ssl else smtplib.SMTP │
│ ❱ 69 │ │ self._server = s(host, port) │
│ 70 │ │ # self._server.set_debuglevel(1) │
│ 71 │ │ try: │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ host = 'smtp.office365.com' │ │
│ │ kwargs = { │ │
│ │ │ 'title': 'Alas <alas> crashed', │ │
│ │ │ 'content': '<alas> GamePageUnknownError' │ │
│ │ } │ │
│ │ password = '打码' │ │
│ │ port = 587 │ │
│ │ s = <class 'smtplib.SMTP_SSL'> │ │
│ │ self = <onepush.providers.smtp.SMTP object at │ │
│ │ 0x000002BC800C2248> │ │
│ │ ssl = True │ │
│ │ user = '打码' │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\smtplib.py:1031 in __init__ │
│ │
│ 1029 │ │ │ self.context = context │
│ 1030 │ │ │ SMTP.__init__(self, host, port, local_hostname, tim │
│ ❱ 1031 │ │ │ │ │ source_address) │
│ 1032 │ │ │
│ 1033 │ │ def _get_socket(self, host, port, timeout): │
│ │
│ ╭───────────────────────────── locals ─────────────────────────────╮ │
│ │ certfile = None │ │
│ │ context = <ssl.SSLContext object at 0x000002BC805A8E48> │ │
│ │ host = 'smtp.office365.com' │ │
│ │ keyfile = None │ │
│ │ local_hostname = None │ │
│ │ port = 587 │ │
│ │ self = <smtplib.SMTP_SSL object at 0x000002BC800C2188> │ │
│ │ source_address = None │ │
│ │ timeout = <object object at 0x000002BCCD307E20> │ │
│ ╰──────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\smtplib.py:251 in __init__ │
│ │
│ 249 │ │ │
│ 250 │ │ if host: │
│ ❱ 251 │ │ │ (code, msg) = self.connect(host, port) │
│ 252 │ │ │ if code != 220: │
│ 253 │ │ │ │ self.close() │
│ │
│ ╭───────────────────────────── locals ─────────────────────────────╮ │
│ │ host = 'smtp.office365.com' │ │
│ │ local_hostname = None │ │
│ │ port = 587 │ │
│ │ self = <smtplib.SMTP_SSL object at 0x000002BC800C2188> │ │
│ │ source_address = None │ │
│ │ timeout = <object object at 0x000002BCCD307E20> │ │
│ ╰──────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\smtplib.py:336 in connect │
│ │
│ 334 │ │ if self.debuglevel > 0: │
│ 335 │ │ │ self._print_debug('connect:', (host, port)) │
│ ❱ 336 │ │ self.sock = self._get_socket(host, port, self.timeout) │
│ 337 │ │ self.file = None │
│ 338 │ │ (code, msg) = self.getreply() │
│ │
│ ╭───────────────────────────── locals ─────────────────────────────╮ │
│ │ host = 'smtp.office365.com' │ │
│ │ port = 587 │ │
│ │ self = <smtplib.SMTP_SSL object at 0x000002BC800C2188> │ │
│ │ source_address = None │ │
│ ╰──────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\smtplib.py:1039 in _get_socket │
│ │
│ 1037 │ │ │ │ │ self.source_address) │
│ 1038 │ │ │ new_socket = self.context.wrap_socket(new_socket, │
│ ❱ 1039 │ │ │ │ │ │ │ │ │ │ │ │ server_hostna │
│ 1040 │ │ │ return new_socket │
│ 1041 │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ host = 'smtp.office365.com' │ │
│ │ new_socket = <socket.socket [closed] fd=-1, │ │
│ │ family=AddressFamily.AF_INET, │ │
│ │ type=SocketKind.SOCK_STREAM, proto=0> │ │
│ │ port = 587 │ │
│ │ self = <smtplib.SMTP_SSL object at 0x000002BC800C2188> │ │
│ │ timeout = <object object at 0x000002BCCD307E20> │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\ssl.py:423 in wrap_socket │
│ │
│ 421 │ │ │ server_hostname=server_hostname, │
│ 422 │ │ │ context=self, │
│ ❱ 423 │ │ │ session=session │
│ 424 │ │ ) │
│ 425 │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ do_handshake_on_connect = True │ │
│ │ self = <ssl.SSLContext object at │ │
│ │ 0x000002BC805A8E48> │ │
│ │ server_hostname = 'smtp.office365.com' │ │
│ │ server_side = False │ │
│ │ session = None │ │
│ │ sock = <socket.socket [closed] fd=-1, │ │
│ │ family=AddressFamily.AF_INET, │ │
│ │ type=SocketKind.SOCK_STREAM, proto=0> │ │
│ │ suppress_ragged_eofs = True │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\ssl.py:870 in _create │
│ │
│ 868 │ │ │ │ │ │ # non-blocking │
│ 869 │ │ │ │ │ │ raise ValueError("do_handshake_on_conne │
│ specified for non-blocking sockets") │
│ ❱ 870 │ │ │ │ │ self.do_handshake() │
│ 871 │ │ │ except (OSError, ValueError): │
│ 872 │ │ │ │ self.close() │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ __class__ = <class 'ssl.SSLSocket'> │ │
│ │ cls = <class 'ssl.SSLSocket'> │ │
│ │ connected = True │ │
│ │ context = <ssl.SSLContext object at │ │
│ │ 0x000002BC805A8E48> │ │
│ │ do_handshake_on_connect = True │ │
│ │ kwargs = { │ │
│ │ │ 'family': <AddressFamily.AF_INET: │ │
│ │ 2>, │ │
│ │ │ 'type': <SocketKind.SOCK_STREAM: 1>, │ │
│ │ │ 'proto': 0, │ │
│ │ │ 'fileno': 2872 │ │
│ │ } │ │
│ │ self = <ssl.SSLSocket [closed] fd=-1, │ │
│ │ family=AddressFamily.AF_INET, │ │
│ │ type=SocketKind.SOCK_STREAM, proto=0> │ │
│ │ server_hostname = 'smtp.office365.com' │ │
│ │ server_side = False │ │
│ │ session = None │ │
│ │ sock = <socket.socket [closed] fd=-1, │ │
│ │ family=AddressFamily.AF_INET, │ │
│ │ type=SocketKind.SOCK_STREAM, proto=0> │ │
│ │ suppress_ragged_eofs = True │ │
│ │ timeout = None │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
│ │
│ E:\桌面\AzurLaneAutoScript\toolkit\lib\ssl.py:1139 in do_handshake │
│ │
│ 1137 │ │ │ if timeout == 0.0 and block: │
│ 1138 │ │ │ │ self.settimeout(None) │
│ ❱ 1139 │ │ │ self._sslobj.do_handshake() │
│ 1140 │ │ finally: │
│ 1141 │ │ │ self.settimeout(timeout) │
│ │
│ ╭────────────────────────────── locals ──────────────────────────────╮ │
│ │ block = False │ │
│ │ self = <ssl.SSLSocket [closed] fd=-1, │ │
│ │ family=AddressFamily.AF_INET, │ │
│ │ type=SocketKind.SOCK_STREAM, proto=0> │ │
│ │ timeout = None │ │
│ ╰────────────────────────────────────────────────────────────────────╯ │
╰────────────────────────────────────────────────────────────────────────╯
SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)
`
outlook 不使用ssl,但是需要starttls 已经向onepush提交修复了,但是什么时候能发版不清楚(
如果急着用可以手动修改一下alas内的 .\toolkit\Lib\site-packages\onepush\providers\smtp.py
成 这个
provider: smtp
host: smtp.office365.com
port: 587
starttls: true
user: ***
password: ***
outlook 不使用ssl,但是需要starttls 已经向onepush提交修复了,但是什么时候能发版不清楚(
如果急着用可以手动修改一下alas内的
.\toolkit\Lib\site-packages\onepush\providers\smtp.py
成 这个provider: smtp host: smtp.office365.com port: 587 starttls: true user: *** password: ***
我修改了文件测试了一下,还是报SSL: WRONG_VERSION_NUMBER
outlook 不使用ssl,但是需要starttls 已经向onepush提交修复了,但是什么时候能发版不清楚( 如果急着用可以手动修改一下alas内的
.\toolkit\Lib\site-packages\onepush\providers\smtp.py
成 这个provider: smtp host: smtp.office365.com port: 587 starttls: true user: *** password: ***
我修改了文件测试了一下,还是报SSL: WRONG_VERSION_NUMBER
ssl: false
OK了,可以收到邮件了,感谢 等onepush合并之后我再关掉吧
这是一个总结
用于帮助希望使用Outlook邮箱作为发信邮箱的用户
-
将alas内的 .\toolkit\Lib\site-packages\onepush\providers\smtp.py 文件修改成 这个
- 在该总结发布时我的alas本地文件未修正,建议检查
-
Outlook的smtp服务需要 在web端设置中打开,并且在微软账户设置中获取 应用密码 来作为授权码
- 别直接用microsoft账户密码,会失败的(
-
ALAS内设置模板为
provider: smtp
host: smtp.office365.com
port: 587
starttls: true
user: ***
password: ***
ssl: false
- 测试
- 享受
END : )
上游已merge