0

在 Linux 中,您可以使用

curl -n --ssl-reqd --mail-from "<$from_address>" --mail-rcpt "<$to_address>" \
     --url smtps://smtp.gmail.com:465 -T message.txt -u "$username:$password"

通过 Gmail 发送电子邮件。

如何使用该方法使用 libCURL for C++ 复制它curl_easy_setopt(curl, CURLOPT_POSTFIELDS, ' ');

谢谢。

4

1 回答 1

1

看 libCurl 例子smtp-tls.c,做谷歌后找到的第一个链接:libCURL send email

于 2012-04-15T22:45:39.993 回答