Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
EmailParser.Inline
Queries an inline graphics property.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
EmailParser | 5.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
EmailID | The ID fo the email parser. | ||
Index | The index from 0 to EmailParser.InlineCount-1. | 0 | |
Selector | Which value to return. Can be Filename, MimeType, MimeVersion, ContentType, ContentTransferEncoding, ContentDisposition, ContentDescription, contentId, text or container. | "Filename" | |
Extra | For selector = container, you can pass an alternative file name. For selector = text, you can pass text encoding here. |
Optional |
Result
Returns value or error.
Description
Queries an inline graphics property.You can query for example the file name or the mime type.
For storing in a container, you can query the container property. The inline graphics is decoded by the plugin.
You can use Text.MimeTypeToFileExtension to find the file extension for mime type.
Examples
Copy all inline graphics into records:
#find all inline graphics
Set Variable [$i; Value:0]
Set Variable [$c; Value:MBS("EmailParser.InlineCount"; $email)]
If [$c > 0]
Go to Related Record [Show only related records; From table: “InlineGraphics”; Using layout: “InlineGraphics” (InlineGraphics)]
Go to Layout [“InlineGraphics” (InlineGraphics)]
Delete All Records [No dialog]
Loop
Set Variable [$Name; Value:MBS("EmailParser.inline"; $email; $i; "filename")]
Set Variable [$content; Value:MBS("EmailParser.Inline"; $email; $i; "container")]
New Record/Request
Set Field [InlineGraphics::Content; $content]
Set Field [InlineGraphics::FileName; $name]
Set Field [InlineGraphics::EmailID; $EmailRecordID]
Commit Records/Requests [Skip data entry validation; No dialog]
#next
Set Variable [$i; Value:$i + 1]
Exit Loop If [$i = $c]
End Loop
End If
See also
- CURL.GetResultAsMime
- EmailParser.InlineCount
- EmailParser.Parse
- EmailParser.Release
- EmailParser.Source
- EmailParser.WriteInline
- Text.MimeTypeToFileExtension
Release notes
- Version 9.3
- Added parameter for EmailParser.Inline or EmailParser.Attachment to pass text encoding or file name.
Example Databases
- CURL/Email/Email Client
- CURL/Email/Email Parser and Preview
- CURL/Email/Email Parser
- CURL/Email/IMAP Email
- Drag and Drop/DragTest
Blog Entries
This function is free to use.
Created 24th September 2015, last changed 14th July 2019
