Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Smtp 无法使用libcurl发送电子邮件 CURL *curl; CURLcode curlres; struct curl_slist *recipients = NULL; char from[128] = "<no-reply@mydomain.com>"; char to[128] = "someuser@gmail.com"; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, COOLCAST_MAILER_URL); curl_easy_setopt(curl, CURLOPT_MAIL_FROM, from); recipients = curl_slist_append(recipients, to); curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients); curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source); curl_easy_setopt(curl, CURLOPT_READDATA, NULL); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); curlres = curl_easy_perform(curl); if(curlres != CURLE_OK) qDebug() << "Encountered error in sending email";_Smtp_Libcurl - Fatal编程技术网

Smtp 无法使用libcurl发送电子邮件 CURL *curl; CURLcode curlres; struct curl_slist *recipients = NULL; char from[128] = "<no-reply@mydomain.com>"; char to[128] = "someuser@gmail.com"; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, COOLCAST_MAILER_URL); curl_easy_setopt(curl, CURLOPT_MAIL_FROM, from); recipients = curl_slist_append(recipients, to); curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients); curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source); curl_easy_setopt(curl, CURLOPT_READDATA, NULL); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); curlres = curl_easy_perform(curl); if(curlres != CURLE_OK) qDebug() << "Encountered error in sending email";

Smtp 无法使用libcurl发送电子邮件 CURL *curl; CURLcode curlres; struct curl_slist *recipients = NULL; char from[128] = "<no-reply@mydomain.com>"; char to[128] = "someuser@gmail.com"; curl = curl_easy_init(); curl_easy_setopt(curl, CURLOPT_URL, COOLCAST_MAILER_URL); curl_easy_setopt(curl, CURLOPT_MAIL_FROM, from); recipients = curl_slist_append(recipients, to); curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients); curl_easy_setopt(curl, CURLOPT_READFUNCTION, payload_source); curl_easy_setopt(curl, CURLOPT_READDATA, NULL); curl_easy_setopt(curl, CURLOPT_VERBOSE, 1); curlres = curl_easy_perform(curl); if(curlres != CURLE_OK) qDebug() << "Encountered error in sending email";,smtp,libcurl,Smtp,Libcurl,似乎我的libcurl用法的真正问题是-它试图发出VRFY,而我希望它使用RCPT to-这就是我在telnet会话中所做的。有没有办法在libcurl中设置该选项?或者代码还有其他问题吗?尝试添加 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); 请参见尝试添加 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L); 请参见尝试添加 curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);

似乎我的
libcurl
用法的真正问题是-它试图发出VRFY,而我希望它使用RCPT to-这就是我在telnet会话中所做的。有没有办法在
libcurl
中设置该选项?或者代码还有其他问题吗?

尝试添加

curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
请参见尝试添加

curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
请参见尝试添加

curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
请参见尝试添加

curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);