Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Sets the port number for the connection.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Value | The new port number. | 8000 |
Returns "OK" on success.
Protocols | Common Ports |
http | 80, 443 with SSL |
ftp | 20 and 21 |
sftp | 22 |
smtp | 25, 465 with SSL, 587 |
pop3 | 110, 995 with SSL |
imap | 143, 993 with TLS |
See also PORT option in CURL manual.
Use Port 25 for smtp:
MBS( "CURL.SetOptionPort"; $curl; 25 )
# alternative 587 or with SSL 465.
Use Port 8080 for http:
MBS( "CURL.SetOptionPort"; $curl; 8080 )
Setup for IMAP with Google GMail:
Set Variable [ $curl ; Value: MBS("CURL.New") ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionPort"; $curl; 993) // IMAP SSL port ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionUseSSL"; $curl; 3) // require SSL ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionSSLVersion"; $curl; 6) // TLSv1.2 ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionURL"; $curl; "imaps://imap.gmail.com/INBOX") ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionUserName"; $curl; $user) ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionPassword"; $curl; $pass) ]
Created 18th August 2014, last changed 2nd May 2021