CURL.SetOptionMailAuth
----------------------

Sets the mail auth option.

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

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

**MBS**( **"CURL.SetOptionMailAuth";** /\* Sets the mail auth option. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**; /\* The new options.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 new options. | "" |  |
| 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" on success.

### Description

Sets the mail auth option.  
This string will be used to specify the authentication address (identity) of a submitted message that is being relayed to another server.  
This optional parameter allows co-operating agents in a trusted environment to communicate the authentication of individual messages and should only be used by the application program, using libcurl, if the application is itself a mail server acting in such an environment. If the application is operating as such and the AUTH address is not known or is invalid, then an empty string should be used for this parameter.  
Unlike [CURL.SetOptionMailRecipients](CURLSetOptionMailRecipients.md), the address should not be specified within a pair of angled brackets (&lt;&gt;). However, if an empty string is used then a pair of brackets will be sent by libcurl as required by RFC 2554.  
See also [MAIL\_AUTH](https://curl.haxx.se/libcurl/c/CURLOPT_MAIL_AUTH.html) option in CURL manual.

### Examples

Set mail auth address:

 MBS ( "CURL.SetOptionMailAuth"; $curl ; "&lt;secret@cave&gt;" )  
### See also

- [CURL.SetOptionFTPSSLAuth](CURLSetOptionFTPSSLAuth.md)
- [CURL.SetOptionHTTPAuth](CURLSetOptionHTTPAuth.md)
- [CURL.SetOptionMailFrom](CURLSetOptionMailFrom.md)
- [CURL.SetOptionMailRecipients](CURLSetOptionMailRecipients.md)
- [CURL.SetOptionPathAsIs](CURLSetOptionPathAsIs.md)
- [CURL.SetOptionProxyAuth](CURLSetOptionProxyAuth.md)
- [CURL.SetOptionSocks5Auth](CURLSetOptionSocks5Auth.md)
- [CURL.SetOptionTimeOut](CURLSetOptionTimeOut.md)

### Blog Entries

- [Translating Insert from URL options for CURL to MBS Plugin calls](https://www.mbsplugins.de/archive/2020-12-14/Translating_Insert_from_URL_op/monkeybreadsoftware_blog_filemaker)

Created 18th August 2014 , last changed 8th February 2018

  
[CURL.SetOptionLowSpeedTime](CURLSetOptionLowSpeedTime.md) - [CURL.SetOptionMailFrom](CURLSetOptionMailFrom.md)

[HTML Version](CURLSetOptionMailAuth.shtml)