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:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Text.ReadEMLXFile
Reads email text from emlx file.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Text | 5.3 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example | Flags |
|---|---|---|---|
| FilePath | The native file path. Something like "/Users/cs/desktop/test.txt" on Mac and "C:\Programs\Data\test.txt" on Windows. Files without path end in the root directory on Mac. | "test.txt" | |
| Encoding | The text encoding for result. Default is native. This function can also handle UTF-16 as well as UTF-16LE and UTF-16BE for little/big endian byte order. Possible encoding names: ANSI, ISO-8859-1, Latin1, Mac, Native, UTF-8, DOS, Hex, Base64 or Windows. More listed in the FAQ. |
UTF8 | Optional |
Result
Returns text on success and error on failure.
Description
Reads email text from emlx file.This function provides the raw text from an emlx file as Apple Mail uses them to store emails. You may need to use Text.ReplaceNewline function to change new line characters.
You have to decide which encoding to use (if not native). We support a few encodings, but we can add more if you need something special.
See also Text.ReadTextFile for normal text files and eml files.
Examples
Read email file:
# emlx test in file Contacts
Set Variable [ $path ; Value: "/Users/cs/Desktop/28213.emlx" ]
Set Variable [ $emailSourceText ; Value: MBS( "Text.ReadEMLXFile"; $path; "UTF-8") ]
If [ MBS("IsError") = 0 ]
Set Variable [ $email ; Value: MBS( "EmailParser.Parse"; $EmailSourceText; "UTF8") ]
If [ MBS("IsError") = 0 ]
Show Custom Dialog [ "Email subject" ; MBS( "EmailParser.Subject"; $email ) ]
Set Variable [ $r ; Value: MBS( "EmailParser.Free"; $email ) ]
End If
End If
See also
- EmailParser.Free
- EmailParser.Parse
- EmailParser.ParseContainer
- EmailParser.ParseFile
- EmailParser.Subject
- IsError
- Text.ReadTextFile
- Text.ReplaceNewline
Blog Entries
Created 14th September 2015, last changed 20th September 2020
Text.MimeTypeToFileExtension - Text.ReadTextFile
Feedback: Report problem or ask question.
Links
MBS Xojo blog