CURLOPT_MIMEPOST.3 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2022, Daniel Stenberg, <[email protected]>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" * SPDX-License-Identifier: curl
  22. .\" *
  23. .\" **************************************************************************
  24. .\"
  25. .TH CURLOPT_MIMEPOST 3 "May 17, 2022" "libcurl 7.85.0" "curl_easy_setopt options"
  26. .SH NAME
  27. CURLOPT_MIMEPOST \- send data from mime structure
  28. .SH SYNOPSIS
  29. .nf
  30. #include <curl/curl.h>
  31. curl_mime *mime;
  32. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MIMEPOST, mime);
  33. .SH DESCRIPTION
  34. Pass a mime handle previously obtained from \fIcurl_mime_init(3)\fP.
  35. This setting is supported by the HTTP protocol to post forms and by the
  36. SMTP and IMAP protocols to provide the email data to send/upload.
  37. This option is the preferred way of posting an HTTP form, replacing and
  38. extending the deprecated \fICURLOPT_HTTPPOST(3)\fP option.
  39. .SH PROTOCOLS
  40. HTTP, SMTP, IMAP.
  41. .SH EXAMPLE
  42. Using this option implies the use of several mime structure building
  43. functions: see https://curl.se/libcurl/c/smtp-mime.html for a complete
  44. example.
  45. .SH AVAILABILITY
  46. Added in 7.56.0
  47. .SH RETURN VALUE
  48. This will return CURLE_OK.
  49. .SH "SEE ALSO"
  50. .BR curl_mime_init "(3)"