GNURLOPT_LOGIN_OPTIONS(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’… GNURLOPT_LOGIN_OPTIONS(3) πŸ’…

okay bestie, welcome to the curl_easy_setopt options manual! This page is CURLOPT_LOGIN_OPTIONS β€” set login options β€” and it's lowkey iconic for telling your transfer how to log in. 🫢

✨ NAME ✨

CURLOPT_LOGIN_OPTIONS β€” set login options πŸ’–

✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char
*options);

✨ DESCRIPTION ✨

Pass a char * as parameter, and it should be pointing at the null-terminated options string to use for the transfer. No cap.

For more info about the login options, pls go see RFC2384, RFC5092, and IETF draft draft-earhart-url-smtp-00.txt. iykyk πŸ“š

CURLOPT_LOGIN_OPTIONS(3) can be used to set protocol specific login options, like the preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*", and it should be used in conjunction with the CURLOPT_USERNAME(3) option. πŸ’…

The application does not have to keep the string around after setting this option. Slay, no memory babysitting required. ✨

πŸŽ€ DEFAULT πŸŽ€

NULL

πŸ¦‹ PROTOCOLS πŸ¦‹

Only IMAP, POP3 and SMTP support login options. periodt.

πŸ”₯ EXAMPLE πŸ”₯

Here's the example, verbatim bestie:

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
  curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*");
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}

🌈 AVAILABILITY 🌈

Added in 7.34.0 πŸŽ€

⭐ RETURN VALUE ⭐

Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘


mwah πŸ’– this page is from libcurl 7.37.0, dated 19 Jun 2014, and it's the GNURLOPT_LOGIN_OPTIONS(3) page. bye bestie, go set those login options 🫢✨

πŸ“¦ where this page comes from