Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CURL.GetResultAsEMailList
Parses result of an IMAP list query.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
CURL | 9.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
curl | The CURL session handle. | $curl |
Result
Returns JSON or error.
Description
Parses result of an IMAP list query.Returns result as JSON with details for emails.
Examples
Query email list as JSON:
Go to Layout [ “IMAP Postbox” (IMAP Postbox) ; Animation: None ]
# get URL
Set Variable [ $URL ; Value: "imap://imap.monkeybreadsoftware.com/INBOX" ]
# query list of emails
Set Variable [ $curl ; Value: MBS("CURL.New") ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionURL"; $curl; $URL) ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionUserName"; $curl; IMAP Postbox::Username) ]
Set Variable [ $r ; Value: MBS("CURL.SetOptionPassword"; $curl; IMAP Postbox::Password) ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionUseSSL"; $curl; 3) // required ]
Set Variable [ $result ; Value: MBS("CURL.SetOptionSSLVersion"; $curl; 6) // TLS v1.2 ]
# Set query for all emails by UID. Not all fields are needed. Only request those you need to make it quicker.
Set Variable [ $r ; Value: MBS("CURL.SetOptionCustomRequest"; $curl; "UID FETCH 1:* (FLAGS INTERNALDATE RFC822.SIZE BODY.PEEK[HEADER.FIELDS (Message-Id DATE FROM SUBJECT TO SENDER REPLY-TO CC BCC)])") ]
# Run transfer
Set Variable [ $result ; Value: MBS("CURL.Perform"; $curl) ]
# We show results for debugging
Set Variable [ $output ; Value: MBS("CURL.GetResultAsText"; $curl) ]
Set Variable [ $debug ; Value: MBS("CURL.GetDebugMessages"; $curl) ]
Set Variable [ $list ; Value: MBS( "JSON.Colorize";MBS("CURL.GetResultAsEMailList"; $curl)) ]
Set Variable [ $r ; Value: MBS("CURL.Release"; $curl) ]
Set Field [ IMAP Postbox::Log ; $debug ]
Set Field [ IMAP Postbox::JSON ; $list ]
See also
- CURL.GetDebugMessages
- CURL.GetResultAsEmail
- CURL.GetResultAsText
- CURL.New
- CURL.Release
- CURL.SetOptionCustomRequest
- CURL.SetOptionPassword
- CURL.SetOptionSSLVersion
- CURL.SetOptionUserName
- JSON.Colorize
Release notes
- Version 14.4
- Improved CURL.GetResultAsEMailList function, so it includes In-Reply-To and References headers if you have them in the query.
- Version 11.1
- Fixed memory leak in CURL.GetResultAsEMailList function.
- Version 10.5
- Fixed a problem with CURL.GetResultAsEMailList sometimes reported an extra erroneous email.
- Version 10.2
- Fixed EmailParser.MessageID, CURL.GetResultAsEmail and CURL.GetResultAsEMailList to trim message IDs, so no space is in front.
- Version 9.1
- Fixed bug in CURL.GetResultAsEMailList to include several CC addresses.
- Version 9.0
- Added new CURL.GetResultAsEMailList function.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 14.4pr6
- MBS FileMaker Plugin, version 11.1pr2
- MBS FileMaker Plugin, version 10.5pr7
- MBS FileMaker Plugin, version 10.2pr7
- MBS FileMaker Plugin, version 9.1pr1
- New MBS FileMaker Plugin 9.0
- Neues MBS FileMaker Plugin 9.0
- MBS FileMaker Plugin, version 9.0pr9
- CURL change for email download via IMAP
- MBS FileMaker Plugin, version 8.6pr5
This function checks for a license.
Created 21st December 2018, last changed 4th March 2023