c++ - 通过 libCURL 发送电子邮件

标签 c++ email curl gmail libcurl

在 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 发送电子邮件。

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

谢谢。

最佳答案

查看 libCurl 示例 smtp-tls.c , 执行 Google: libCURL send email 后找到的第一个链接

关于c++ - 通过 libCURL 发送电子邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10166754/

相关文章:

python - Python 的 Requests 模块是否将数据添加到它正在发布的文件中?

c++ - `std::condition_variable::wait_for` 经常调用谓词

php - 使用xampp服务器在php中发送电子邮件?

c++ - 在 Rails 应用程序中使用 C++ 解决方案

ios - 使用 UIActivityViewController 共享视频时,邮件未附加视频

ios - 在不显示 View Controller 的情况下使用 MFMailComposeViewController

curl - 如何通过 github API 使用 ssh 身份验证?

rest - 使用url confluence REST API获取内容

c++ - 基本 GL 函数 glTranslatef 似乎不起作用

java - 我怎样才能避免在 java 中做很多 if?