为什么我在尝试使用 libcurl 时遇到此错误?

问题描述 投票:0回答:0

我刚刚准备好

libcurl
的设置,我尝试使用 https://curl.se/libcurl/c/smtp-mail.html 中的示例使用 SMTP 发送电子邮件。 但我一直收到这个错误:

curl_easy_perform() failed: Failed sending data to the peer

我一直在互联网上查找修复程序,但无济于事。

我启用详细模式使用。这是我得到的:

*   Trying 173.194.76.109:25...
* Connected to smtp.gmail.com (173.194.76.109) port 25 (#0)
< 220 smtp.gmail.com ESMTP v13-20020a05600c214d00b003edf2dc7ca3sm1151417wml.34 - gsmtp
> EHLO DESKTOP-BAQJT2S
< 250-smtp.gmail.com at your service, [41.141.217.227]
< 250-SIZE 35882577
< 250-8BITMIME
< 250-STARTTLS
< 250-ENHANCEDSTATUSCODES
< 250-PIPELINING
< 250-CHUNKING
< 250 SMTPUTF8
> MAIL FROM:<[email protected]>
< 530 5.7.0 Must issue a STARTTLS command first. v13-20020a05600c214d00b003edf2dc7ca3sm1151417wml.34 - gsmtp
* MAIL failed: 530
> QUIT
< 221 2.0.0 closing connection v13-20020a05600c214d00b003edf2dc7ca3sm1151417wml.34 - gsmtp
* Closing connection 0
curl_easy_perform() failed: (55) Failed sending data to the peer

这个错误是什么意思?我该如何解决?

c curl smtp libcurl
© www.soinside.com 2019 - 2024. All rights reserved.