Skip to content
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

邮件发送不成功 #150

Open
liuchangfu opened this issue Oct 11, 2022 · 0 comments
Open

邮件发送不成功 #150

liuchangfu opened this issue Oct 11, 2022 · 0 comments

Comments

@liuchangfu
Copy link

用例执行完成生成测试报告后,邮件发送不了,试了QQ邮箱、Gmail邮箱都不行,老是提示【由于目标计算机积极拒绝,无法连接】求指点。

Traceback (most recent call last):
File "E:\workspace\Demo\test_dir\test_baidu_sample.py", line 28, in
smtp.sendmail(to='[email protected]', subject='Email Test', attachments=str(report_path), delete=False)
File "D:\Python310\lib\site-packages\seldom\utils\send_extend.py", line 23, in sendmail
self.sender(to=to, subject=subject, attachments=attachments)
File "D:\Python310\lib\site-packages\XTestRunner_email.py", line 76, in sender
smtp = smtplib.SMTP_SSL(self.host, self.port)
File "D:\Python310\lib\smtplib.py", line 1050, in init
SMTP.init(self, host, port, local_hostname, timeout,
File "D:\Python310\lib\smtplib.py", line 255, in init
(code, msg) = self.connect(host, port)
File "D:\Python310\lib\smtplib.py", line 341, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "D:\Python310\lib\smtplib.py", line 1056, in _get_socket
new_socket = super()._get_socket(host, port, timeout)
File "D:\Python310\lib\smtplib.py", line 312, in _get_socket
return socket.create_connection((host, port), timeout,
File "D:\Python310\lib\socket.py", line 845, in create_connection
raise err
File "D:\Python310\lib\socket.py", line 833, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] 由于目标计算机积极拒绝,无法连接。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant