1 .\" **************************************************************************
3 .\" * Project ___| | | | _ \| |
4 .\" * / __| | | | |_) | |
5 .\" * | (__| |_| | _ <| |___
6 .\" * \___|\___/|_| \_\_____|
8 .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
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.haxx.se/docs/copyright.html.
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.
18 .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 .\" * KIND, either express or implied.
21 .\" **************************************************************************
23 .TH CURLOPT_MIMEPOST 3 "September 04, 2017" "libcurl 7.59.0" "curl_easy_setopt options"
26 CURLOPT_MIMEPOST \- set post/send data from mime structure
29 #include <curl/curl.h>
33 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_MIMEPOST, mime);
35 Pass a mime handle previously obtained from \fIcurl_mime_init(3)\fP.
37 This setting is supported by the HTTP protocol to post forms and by the
38 SMTP and IMAP protocols to provide the e-mail data to send/upload.
40 This option is the preferred way of posting an HTTP form, replacing and
41 extending the deprecated \fICURLOPT_HTTPPOST(3)\fP option.
47 This will return CURLE_OK.
49 Using this option implies the use of several mime structure building
50 functions: see https://curl.haxx.se/libcurl/c/smtp-mime.html for a complete
53 .BR curl_mime_init "(3)"