Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.SetOptionPort
Sets the port number for the connection.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 2.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Value | The new port number. | 8000 |
Result
Returns "OK" on success.
Description
Sets the port number for the connection.Specify what remote port number to connect to, instead of the one specified in the URL or the default port for the used protocol.
See also CURL.SetOptionFTPPort.
Protocols | Common Ports |
http | 80, 443 with SSL |
ftp | connect with 21 and later uses 20 for data transfer. |
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.
Examples
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) ]
See also
- CURL.SetOptionGet
- CURL.SetOptionPost
- CURL.SetOptionProxy
- CURL.SetOptionQuote
- CURL.SetOptionRange
- CURL.SetOptionSSLCert
- CURL.SetOptionURL
- CURL.SetOptionUserName
- CURL.SetOptionUseSSL
- SendMail.SetSMTPServer
Example Databases
- CURL/Email/Batch Emailer
- CURL/Email/Build and send Email
- CURL/Email/Build and send HTML Email with inline graphics
- CURL/Email/IMAP Email List
- CURL/Email/IMAP Email Upload
- CURL/Email/IMAP Email
- CURL/Email/List IMAP folders
- CURL/Email/Office 365 oAuth SMTP
Blog Entries
- SMTP with OAuth for Office 365 in FileMaker
- Sending email with a huge custom function
- Email Script for FileMaker
- Upload email to Sent folder via IMAP
- Sending emails in FileMaker with MBS Plugin
- Tip of the day: FTP File Upload
- Sending Email with FileMaker via MBS Plugin
FileMaker Magazin
Created 18th August 2014, last changed 18th January 2024