当我在脚本中运行以下命令时(使用 win10 笔记本电脑)
c:\curl\bin\curl.exe -v -k --connect-timeout 100 --max-time 200 --url "smtps://smtp.gmail.com:465" --user "[email protected]:password" --mail-from "[email protected]" --mail-rcpt "[email protected]" -H "To: [email protected]" --upload-file C:\backup\securities02012024.log 2>c:\backup\curltest.log
- 当通过单击文件资源管理器中的批处理文件发送或使用任务计划程序运行时,它不起作用以下是错误消息
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Host smtp.gmail.com:465 was resolved.
* IPv6: (none)
* IPv4: 172.253.118.109
* Trying 172.253.118.109:465...
* connect to 172.253.118.109 port 465 from 0.0.0.0 port 46043 failed: Bad access
* Failed to connect to smtp.gmail.com port 465 after 37 ms: Couldn't connect to server
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
* Closing connection
curl: (7) Failed to connect to smtp.gmail.com port 465 after 37 ms: Couldn't connect to server
- 当通过命令提示符运行批处理文件时,邮件被送达。可能是什么问题?