CURL.SetOptionLoginOptions
--------------------------

Sets login options string to use for the transfer.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [CURL](component_CURL.md) | [5.4](newinversion54.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "CURL.SetOptionLoginOptions"; curl; Value { ; Encoding } ) 

**MBS**( **"CURL.SetOptionLoginOptions";** /\* Sets login options string to use for the transfer. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* The options string.e.g. "" \*/   
**$Encoding**) /\* Optional; The text encoding for text parameter.   
Default is UTF-8.e.g. "utf8" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| curl | The CURL session handle. | $curl |  |
| Value | The options string. | "" |  |
| Encoding | The text encoding for text parameter.    Default is UTF-8.   Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the [FAQ](https://www.monkeybreadsoftware.com/filemaker/faq.shtml). | "utf8" | Optional |

### Result

Returns OK or error.

### Description

Sets login options string to use for the transfer.  
For more information about the login options please see RFC 2384, RFC5092 and IETF draft draft-earhart-url-smtp-00.txt  
  
OptionLoginOptions can be used to set protocol specific login options, such as the preferred authentication mechanism via "AUTH=NTLM" or "AUTH=\*", and should be used in conjunction with the [CURL.SetOptionUserName](CURLSetOptionUserName.md) option.  
Only IMAP, POP3 and SMTP support login options.  
See also [LOGIN\_OPTIONS](https://curl.haxx.se/libcurl/c/CURLOPT_LOGIN_OPTIONS.html) option in CURL manual.

### Examples

Use plain authentication:

 Set Variable \[$r ; Value: MBS ("CURL.SetOptionLoginOptions"; $curl ; "AUTH=PLAIN")\]  
Use CRAM MD5 authentication:

 Set Variable \[$r ; Value: MBS ("CURL.SetOptionLoginOptions"; $curl ; "AUTH=CRAM-MD5")\]  
Use LOGIN with username and password:

 Set Variable \[$r ; Value: MBS ("CURL.SetOptionLoginOptions"; $curl ; "AUTH=LOGIN")\]  
Use NTLM authentication:

 Set Variable \[$r ; Value: MBS ("CURL.SetOptionLoginOptions"; $curl ; "AUTH=NTLM")\]  
### See also

- [CURL.GetOptionTelnetOptions](CURLGetOptionTelnetOptions.md)
- [CURL.SetOptionHeaderOptions](CURLSetOptionHeaderOptions.md)
- [CURL.SetOptionMimeOptions](CURLSetOptionMimeOptions.md)
- [CURL.SetOptionProxySSLOptions](CURLSetOptionProxySSLOptions.md)
- [CURL.SetOptionSSLOptions](CURLSetOptionSSLOptions.md)
- [CURL.SetOptionTelnetOptions](CURLSetOptionTelnetOptions.md)
- [CURL.SetOptionTFTPNoOptions](CURLSetOptionTFTPNoOptions.md)
- [CURL.SetOptionUserName](CURLSetOptionUserName.md)
- [SendMail.PrepareCURL](SendMailPrepareCURL.md)
- [SendMail.SetSMTPServer](SendMailSetSMTPServer.md)

### Blog Entries

- [GMail for emails with MBS Plugin](https://www.mbsplugins.de/archive/2021-04-18/GMail_for_emails_with_MBS_Plug/monkeybreadsoftware_blog_filemaker)
- [Email Script for FileMaker](https://www.mbsplugins.de/archive/2018-10-10/Email_Script_for_FileMaker/monkeybreadsoftware_blog_filemaker)

Created 22nd November 2015 , last changed 11st March 2024

  
[CURL.SetOptionLocalPortRange](CURLSetOptionLocalPortRange.md) - [CURL.SetOptionLowSpeedLimit](CURLSetOptionLowSpeedLimit.md)

[HTML Version](CURLSetOptionLoginOptions.shtml)