SeldomQA / seldom

Seldom automation testing framework based on unittest

Home Page:https://seldomqa.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

邮件发送不成功

liuchangfu opened this issue · comments

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

Traceback (most recent call last):
File "E:\workspace\Demo\test_dir\test_baidu_sample.py", line 28, in
smtp.sendmail(to='liuchangfu19851220@gmail.com', 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] 由于目标计算机积极拒绝,无法连接。