I'm newbie in C, how I can connect to remote smtp server and send manually command RCPT TO
using curl? I'm read curl docs, but not found answer.
Asked
Active
Viewed 126 times
-1

Андрей Антонов
- 298
- 1
- 4
- 16
-
Please explain what you want to achieve. `libcurl` is a high level API that should make it easy to perform complex protocol tasks. What about other protocol commands before `RCPT_TO`, what about handling the response? If you really want to send **only** `RCPT_TO` (which doesn't make sense), CURL may not be the right tool. – Bodo Jun 06 '19 at 13:33
1 Answers
-1
If you want to implement this in C, see the example on the CURL page
https://curl.haxx.se/libcurl/c/smtp-mail.html
A command line example for sending mail with curl
you can find on
https://stackoverflow.com/a/16069786/10622916

Bodo
- 9,287
- 1
- 13
- 29
-
The example does not show how the RCPT TO commands are executed. Function `curl_easy_perform()` do it hidden. – Андрей Антонов Jun 06 '19 at 12:26