1--- 2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. 3SPDX-License-Identifier: curl 4Title: CURLOPT_SASL_IR 5Section: 3 6Source: libcurl 7See-also: 8 - CURLOPT_MAIL_AUTH (3) 9 - CURLOPT_MAIL_FROM (3) 10 - CURLOPT_SASL_AUTHZID (3) 11Protocol: 12 - SMTP 13 - IMAP 14--- 15 16# NAME 17 18CURLOPT_SASL_IR - send initial response in first packet 19 20# SYNOPSIS 21 22~~~c 23#include <curl/curl.h> 24 25CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable); 26~~~ 27 28# DESCRIPTION 29 30Pass a long. If the value is 1, curl sends the initial response to the server 31in the first authentication packet in order to reduce the number of ping pong 32requests. Only applicable to the following supporting SASL authentication 33mechanisms: 34 35* Login 36* Plain 37* GSSAPI 38* NTLM 39* OAuth 2.0 40 41Note: Whilst IMAP supports this option there is no need to explicitly set it, 42as libcurl can determine the feature itself when the server supports the 43SASL-IR CAPABILITY. 44 45# DEFAULT 46 470 48 49# EXAMPLE 50 51~~~c 52int main(void) 53{ 54 CURL *curl = curl_easy_init(); 55 if(curl) { 56 CURLcode res; 57 curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/"); 58 curl_easy_setopt(curl, CURLOPT_SASL_IR, 1L); 59 res = curl_easy_perform(curl); 60 curl_easy_cleanup(curl); 61 } 62} 63~~~ 64 65# AVAILABILITY 66 67Added in 7.31.0 68 69# RETURN VALUE 70 71Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. 72