CURL.SetOptionUseSSL
--------------------

Sets whether to use SSL for next transfers.

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

MBS( "CURL.SetOptionUseSSL"; curl; Value ) 

**MBS**( **"CURL.SetOptionUseSSL";** /\* Sets whether to use SSL for next transfers. \*/  
**$curl**; /\* The CURL session handle. \*/   
**$Value**) /\* The new SSL setting.e.g. 3 \*/ 

(old name: CURL.SetOptionFTPSSL)

### Parameters

| Parameter | Description | Example |
|---|---|---|
| curl | The CURL session handle. | $curl |
| Value | The new SSL setting. | 3 |

### Result

Returns "OK" on success.

### Description

Sets whether to use SSL for next transfers.  
Pass a number using one of the values from below, to make libcurl use your desired level of SSL for the FTP transfer.  
  
| None | 0 | Don't attempt to use SSL. |
|---|--:|---|
| Try | 1 | Try using SSL, proceed as normal otherwise. |
| Control | 2 | Require SSL for the control connection or fail with CURLE\_USE\_SSL\_FAILED. |
| All | 3 | Require SSL for all communication or fail with CURLE\_USE\_SSL\_FAILED. |

  
Even as this function used to have FTP in name, we also use it for email sending. So the email upload starts unencrypted and we use TLS to upgrade to an SSL connection.  
See also [USE\_SSL](https://curl.haxx.se/libcurl/c/CURLOPT_USE_SSL.html) option in CURL manual.

### Examples

Set to use SSL:

 $r = MBS ( "CURL.SetOptionUseSSL"; $curl ; 3 )  
Set to use TLSv1.2:

 Set Variable \[$r ; MBS ( "CURL.SetOptionUseSSL"; $curl ; 3 ) \]  
Set Variable \[$r ; MBS ( "[CURL.SetOptionSSLVersion](CURLSetOptionSSLVersion.md)"; $curl ; 6 ) \]  
Set URL for Gmail imap server:

 Set Variable \[$r ; Value:MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; "imaps://imap.gmail.com/INBOX")\]  
Set Variable \[$r ; Value:MBS ("CURL.SetOptionUseSSL"; $curl ; 3)\]  
Query emails via POP3 from GMail:

 Set Variable \[ $curl ; Value: MBS ("[CURL.New](CURLNew.md)") \]   
\# use pop3s for SSL ehre   
Set Variable \[ $r ; Value: MBS ("[CURL.SetOptionURL](CURLSetOptionURL.md)"; $curl ; "pop3s://pop.gmail.com/") \]   
Set Variable \[ $r ; Value: MBS ("[CURL.SetOptionUserName](CURLSetOptionUserName.md)"; $curl ; EmailClient::Username ) \]   
Set Variable \[ $r ; Value: MBS ("[CURL.SetOptionPassword](CURLSetOptionPassword.md)"; $curl ; EmailClient::Password ) \]   
\# set custom port. 995 is default for pop3 over SSL, so no need to set it   
Set Variable \[ $r ; Value: MBS ("[CURL.SetOptionPort](CURLSetOptionPort.md)"; $curl ; 995) \]   
\# we need TLS v1.2   
Set Variable \[ $r ; Value: MBS ("CURL.SetOptionUseSSL"; $curl ; 3) \]   
Set Variable \[ $r ; Value: MBS ("[CURL.SetOptionSSLVersion](CURLSetOptionSSLVersion.md)"; $curl ; 6) \]   
\# and 10 second timeout   
Set Variable \[ $r ; Value: MBS ("[CURL.SetOptionConnectionTimeout](CURLSetOptionConnectionTimeout.md)"; $curl ; 10) \]  
### See also

- [CURL.SetOptionConnectionTimeout](CURLSetOptionConnectionTimeout.md)
- [CURL.SetOptionGet](CURLSetOptionGet.md)
- [CURL.SetOptionNetRC](CURLSetOptionNetRC.md)
- [CURL.SetOptionPassword](CURLSetOptionPassword.md)
- [CURL.SetOptionPort](CURLSetOptionPort.md)
- [CURL.SetOptionUpload](CURLSetOptionUpload.md)
- [CURL.SetOptionURL](CURLSetOptionURL.md)
- [CURL.SetOptionUserName](CURLSetOptionUserName.md)
- [SendMail.PrepareCURL](SendMailPrepareCURL.md)
- [SendMail.SetSMTPServer](SendMailSetSMTPServer.md)

### Example Databases

- [CURL/Email/Batch Emailer](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/Batch%20Emailer.shtml#1ScriptAnchor_)
- [CURL/Email/IMAP Email](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/IMAP%20Email.shtml#11ScriptAnchor_)
- [CURL/Email/List IMAP folders](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/Email/List%20IMAP%20folders.shtml#1ScriptAnchor_)
- [CURL/FTP/CURL FTP Directory Listing](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/FTP/CURL%20FTP%20Directory%20Listing.shtml#1ScriptAnchor_)
- [CURL/FTP/CURL FTP Download all Files in Directory](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/FTP/CURL%20FTP%20Download%20all%20Files%20in%20Directory.shtml#2ScriptAnchor_)
- [CURL/FTP/CURL FTP Download File](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/FTP/CURL%20FTP%20Download%20File.shtml#2ScriptAnchor_)
- [CURL/FTP/CURL FTP Upload File](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/FTP/CURL%20FTP%20Upload%20File.shtml#2ScriptAnchor_)
- [CURL/FTP/CURL FTP Upload from file with Progress](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/FTP/CURL%20FTP%20Upload%20from%20file%20with%20Progress.shtml#2ScriptAnchor_)
- [CURL/FTP/CURL FTP Upload multiple files](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/FTP/CURL%20FTP%20Upload%20multiple%20files.shtml#2ScriptAnchor_)
- [CURL/FTP/CURL FTP Upload](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/CURL/FTP/CURL%20FTP%20Upload.shtml#1ScriptAnchor_)

### Blog Entries

- [IMAP Upload Flags](https://www.mbsplugins.de/archive/2025-06-17/IMAP_Upload_Flags/monkeybreadsoftware_blog_filemaker)
- [Using Gmail with oAuth2 for SMTP with MBS Plugin](https://www.mbsplugins.de/archive/2025-05-08/Using_Gmail_with_oAuth2_for_SM/monkeybreadsoftware_blog_filemaker)
- [SFTP Upload with temporary file](https://www.mbsplugins.de/archive/2023-03-06/SFTP_Upload_with_temporary_fil/monkeybreadsoftware_blog_filemaker)
- [SMTP with OAuth for Office 365 in FileMaker](https://www.mbsplugins.de/archive/2022-11-22/SMTP_with_OAuth_for_Office_365/monkeybreadsoftware_blog_filemaker)
- [Sending email with a huge custom function](https://www.mbsplugins.de/archive/2021-06-26/Sending_email_with_a_huge_cust/monkeybreadsoftware_blog_filemaker)
- [GMail for emails with MBS Plugin](https://www.mbsplugins.de/archive/2021-04-18/GMail_for_emails_with_MBS_Plug/monkeybreadsoftware_blog_filemaker)
- [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)
- [Email Script for FileMaker](https://www.mbsplugins.de/archive/2018-10-10/Email_Script_for_FileMaker/monkeybreadsoftware_blog_filemaker)
- [Upload email to Sent folder via IMAP](https://www.mbsplugins.de/archive/2017-12-14/Upload_email_to_Sent_folder_vi/monkeybreadsoftware_blog_filemaker)
- [Sending emails in FileMaker with MBS Plugin](https://www.mbsplugins.de/archive/2016-10-03/Sending_emails_in_FileMaker_wi/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 2/2025, Seite 22](https://filemaker-magazin.de/neuigkeit/4286-Appetithappen-FMM_202502)
- [Ausgabe 5/2014, Seite 26](https://filemaker-magazin.de/neuigkeit/3759-Appetithappen-FMM_201405)

Created 18th August 2014 , last changed 5th September 2025

  
[CURL.SetOptionUploadFlags](CURLSetOptionUploadFlags.md) - [CURL.SetOptionUserAgent](CURLSetOptionUserAgent.md)

[HTML Version](CURLSetOptionUseSSL.shtml)