Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

MBS FileMaker Plugin Example Databases

Email Parser and Preview

All examples are included with download of MBS FileMaker Plugin.

Email Parser and Preview.fmp12

Overview
Tables4
Relationships3
Layouts4
Scripts4
Value Lists0
Custom Functions0
Custom Menus33
File Options
Default custom menu set[Standard FileMaker Menus]
When opening file
Minimum allowed version12.0
Login usingAccount Name; Account= Admin
Allow user to save passwordOff
Require iOS passcodeOff
Switch to layoutOff
Hide all toolbarsOff
Script triggers
OnFirstWindowOpenOff
OnLastWindowCloseOff
OnWindowOpenOff
OnWindowCloseOff
OnFileAVPlayerChangeOff
Thumbnail Settings
Generate ThumbnailsOn; Temporary

 

Tables

Table Name
Statistics
Occurrences in Relationship Graph
Email Parser
7 fields defined, 0 record
Email Parser
Address
4 fields defined, 0 record
Address
Attachment
3 fields defined, 0 record
Attachment
InlineGraphics
4 fields defined, 0 record
InlineGraphics

Fields

Table Name: Email Parser - 7 Fields
Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
InputNormal, TextAuto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Global
  • Repetitions: 1
  • Index Language: German
      SubjectNormal, TextAuto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          PlainTextNormal, TextAuto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              HTMLTextNormal, TextAuto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  MailerNormal, TextAuto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      EmailIDNormal, NumberAuto-Enter:
                      • Allow editing
                      • Do not replace existing value for field (if any)
                      • Context table: Email Parser
                        Calculation: Get ( RecordID )
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: All
                      • Index Language: German
                        DatumNormal, TextAuto-Enter:
                        • Allow editing
                        Validation:
                        • Only during data entry
                        Storage:
                        • Repetitions: 1
                        • Indexing: None
                        • Automatically create indexes as needed
                        • Index Language: German

                            Table Name: Address - 4 Fields
                            Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                            TypeNormal, TextAuto-Enter:
                            • Allow editing
                            Validation:
                            • Only during data entry
                            Storage:
                            • Repetitions: 1
                            • Indexing: None
                            • Automatically create indexes as needed
                            • Index Language: German
                                NameNormal, TextAuto-Enter:
                                • Allow editing
                                Validation:
                                • Only during data entry
                                Storage:
                                • Repetitions: 1
                                • Indexing: None
                                • Automatically create indexes as needed
                                • Index Language: German
                                    EmailNormal, TextAuto-Enter:
                                    • Allow editing
                                    Validation:
                                    • Only during data entry
                                    Storage:
                                    • Repetitions: 1
                                    • Indexing: None
                                    • Automatically create indexes as needed
                                    • Index Language: German
                                        EmailIDNormal, NumberAuto-Enter:
                                        • Allow editing
                                        Validation:
                                        • Only during data entry
                                        Storage:
                                        • Repetitions: 1
                                        • Indexing: All
                                        • Index Language: German

                                            Table Name: Attachment - 3 Fields
                                            Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                                            EmailIDNormal, NumberAuto-Enter:
                                            • Allow editing
                                            Validation:
                                            • Only during data entry
                                            Storage:
                                            • Repetitions: 1
                                            • Indexing: All
                                            • Index Language: German
                                              ContentNormal, BinaryAuto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                                  FileNameNormal, TextAuto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: None
                                                  • Automatically create indexes as needed
                                                  • Index Language: German

                                                      Table Name: InlineGraphics - 4 Fields
                                                      Field NameTypeOptionsCommentsOn LayoutsIn RelationshipsIn ScriptsIn Value Lists
                                                      EmailIDNormal, NumberAuto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: All
                                                      • Index Language: German
                                                        ContentNormal, BinaryAuto-Enter:
                                                        • Allow editing
                                                        Validation:
                                                        • Only during data entry
                                                        Storage:
                                                        • Repetitions: 1
                                                            FileNameNormal, TextAuto-Enter:
                                                            • Allow editing
                                                            Validation:
                                                            • Only during data entry
                                                            Storage:
                                                            • Repetitions: 1
                                                            • Indexing: None
                                                            • Automatically create indexes as needed
                                                            • Index Language: German
                                                                CIDNormal, TextAuto-Enter:
                                                                • Allow editing
                                                                Validation:
                                                                • Only during data entry
                                                                Storage:
                                                                • Repetitions: 1
                                                                • Indexing: None
                                                                • Automatically create indexes as needed
                                                                • Index Language: German

                                                                    Relationship: Email Parser=Address

                                                                    Table OccurrenceEmail ParserAddress
                                                                    FieldEmailID=EmailID
                                                                    Source TableEmail ParserAddress
                                                                    Source FileEmail Parser and Preview.fmp12Email Parser and Preview.fmp12
                                                                    Allow creation of records via this relationshipOffOff
                                                                    Delete related records in this table when a record is deleted in the other tableOffOff
                                                                    Sort records

                                                                    Off

                                                                    Off

                                                                    Relationship: Email Parser=InlineGraphics

                                                                    Table OccurrenceEmail ParserInlineGraphics
                                                                    FieldEmailID=EmailID
                                                                    Source TableEmail ParserInlineGraphics
                                                                    Source FileEmail Parser and Preview.fmp12Email Parser and Preview.fmp12
                                                                    Allow creation of records via this relationshipOffOff
                                                                    Delete related records in this table when a record is deleted in the other tableOffOff
                                                                    Sort records

                                                                    Off

                                                                    Off

                                                                    Layouts

                                                                    Layout Hierarchy

                                                                    Email Parser
                                                                    Address
                                                                    Attachment
                                                                    InlineGraphics


                                                                    Layout NameInclude In MenuQuick Find# of ObjectsShow Records FromSave record changes automaticallyShow field frames when record is activeShow field frames only on current recordShow current record indicator in List ViewUsed in ScriptsCustom Menu SetScript TriggersTheme ID
                                                                    Email ParserYesYes Email ParserOnOnOffOn [File Default]01
                                                                    AddressYesYes AddressOnOnOffOn [File Default]01
                                                                    AttachmentYesYes AttachmentOnOnOffOn [File Default]01
                                                                    InlineGraphicsYesYes InlineGraphicsOnOnOffOn [File Default]01

                                                                    Layout Objects: Email Parser

                                                                    Regular Fields

                                                                    Field Name: Email Parser::Input
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 6 pt
                                                                    • Left: 132 pt
                                                                    • Bottom: 104 pt
                                                                    • Right: 385 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    No

                                                                    Field Name: Email Parser::Subject
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 120 pt
                                                                    • Left: 132 pt
                                                                    • Bottom: 134 pt
                                                                    • Right: 385 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Email Parser::PlainText
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 174 pt
                                                                    • Left: 132 pt
                                                                    • Bottom: 320 pt
                                                                    • Right: 481 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Email Parser::HTMLText
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 174 pt
                                                                    • Left: 486 pt
                                                                    • Bottom: 320 pt
                                                                    • Right: 835 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Email Parser::Mailer
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 138 pt
                                                                    • Left: 132 pt
                                                                    • Bottom: 152 pt
                                                                    • Right: 385 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Address::Type
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 645 pt
                                                                    • Left: 9 pt
                                                                    • Bottom: 660 pt
                                                                    • Right: 188 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Address::Name
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 645 pt
                                                                    • Left: 189 pt
                                                                    • Bottom: 660 pt
                                                                    • Right: 368 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Address::Email
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 645 pt
                                                                    • Left: 369 pt
                                                                    • Bottom: 660 pt
                                                                    • Right: 547 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Attachment::Content
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 644 pt
                                                                    • Left: 557 pt
                                                                    • Bottom: 660 pt
                                                                    • Right: 688 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    No

                                                                    Field Name: Attachment::FileName
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 644 pt
                                                                    • Left: 689 pt
                                                                    • Bottom: 660 pt
                                                                    • Right: 819 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: InlineGraphics::Content
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 644 pt
                                                                    • Left: 830 pt
                                                                    • Bottom: 660 pt
                                                                    • Right: 964 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    No

                                                                    Field Name: InlineGraphics::FileName
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 644 pt
                                                                    • Left: 965 pt
                                                                    • Bottom: 660 pt
                                                                    • Right: 1098 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Email Parser::EmailID
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 120 pt
                                                                    • Left: 780 pt
                                                                    • Bottom: 134 pt
                                                                    • Right: 835 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Email Parser::Datum
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 156 pt
                                                                    • Left: 132 pt
                                                                    • Bottom: 170 pt
                                                                    • Right: 385 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: Default for Data Type
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Group Buttons

                                                                    Button PropertiesCoordinatesScript/Script Step
                                                                      Type:
                                                                    • Text: Parse Email
                                                                      Additional Properties:
                                                                    • Change to hand cursor over button
                                                                    • Rectangular
                                                                    • Top: 78 pt
                                                                    • Left: 402 pt
                                                                    • Bottom: 103 pt
                                                                    • Right: 529 pt
                                                                    • Anchoring: Left, Top
                                                                    Perform Script [ “ParseEmail” ]

                                                                    Scripts:


                                                                    Button PropertiesCoordinatesScript/Script Step
                                                                      Type:
                                                                    • Text: Show Preview
                                                                      Additional Properties:
                                                                    • Change to hand cursor over button
                                                                    • Rectangular
                                                                    • Top: 145 pt
                                                                    • Left: 731 pt
                                                                    • Bottom: 170 pt
                                                                    • Right: 835 pt
                                                                    • Anchoring: Left, Top
                                                                    Perform Script [ “ShowEmail” ]

                                                                    Scripts:


                                                                    Button PropertiesCoordinatesScript/Script Step
                                                                      Type:
                                                                    • Text: Load test email
                                                                      Additional Properties:
                                                                    • Change to hand cursor over button
                                                                    • Rectangular
                                                                    • Top: 14 pt
                                                                    • Left: 714 pt
                                                                    • Bottom: 39 pt
                                                                    • Right: 831 pt
                                                                    • Anchoring: Left, Top
                                                                    Perform Script [ “Load Test Email” ]

                                                                    Scripts:


                                                                    Portals

                                                                    Portal PropertiesCoordinatesFieldsOptions
                                                                    • Top: 643 pt
                                                                    • Left: 8 pt
                                                                    • Bottom: 764 pt
                                                                    • Right: 549 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Objects
                                                                    • Sort records: Off
                                                                    • Filter calculation: None
                                                                    • Initial Row: 1
                                                                    • Number of Rows: 7

                                                                    Portal PropertiesCoordinatesFieldsOptions
                                                                    • Top: 643 pt
                                                                    • Left: 556 pt
                                                                    • Bottom: 770 pt
                                                                    • Right: 821 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Objects
                                                                    • Sort records: Off
                                                                    • Filter calculation: None
                                                                    • Initial Row: 1
                                                                    • Number of Rows: 7

                                                                    Portal PropertiesCoordinatesFieldsOptions
                                                                    • Top: 643 pt
                                                                    • Left: 829 pt
                                                                    • Bottom: 770 pt
                                                                    • Right: 1100 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Objects
                                                                    • Sort records: Off
                                                                    • Filter calculation: None
                                                                    • Initial Row: 1
                                                                    • Number of Rows: 7

                                                                    Web Viewer Controls

                                                                    Web Viewer Control PropertiesCoordinatesWeb Address
                                                                      Object Name:
                                                                    • web
                                                                      Additional Properties:
                                                                    • Allow interaction with web viewer content
                                                                    • Display progress bar
                                                                    • Display status messages
                                                                    • Automatically encode URL
                                                                    • Top: 324 pt
                                                                    • Left: 132 pt
                                                                    • Bottom: 634 pt
                                                                    • Right: 835 pt
                                                                    • Anchoring: Left, Top
                                                                    "about:blank"

                                                                    Layout Objects: Address

                                                                    Regular Fields

                                                                    Field Name: Address::Type
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 24 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 38 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Address::Name
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 42 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 56 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Address::Email
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 60 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 74 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Layout Objects: Attachment

                                                                    Regular Fields

                                                                    Field Name: Attachment::EmailID
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 24 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 38 pt
                                                                    • Right: 217 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: Attachment::Content
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 42 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 167 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    No

                                                                    Field Name: Attachment::FileName
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 168 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 182 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Layout Objects: InlineGraphics

                                                                    Regular Fields

                                                                    Field Name: InlineGraphics::EmailID
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 24 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 38 pt
                                                                    • Right: 217 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: InlineGraphics::Content
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 42 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 167 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    No

                                                                    Field Name: InlineGraphics::FileName
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 168 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 182 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: System Default
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Field Name: InlineGraphics::CID
                                                                    Field PropertiesCoordinatesField FormatField BehaviorQuick Find
                                                                    • Top: 191 pt
                                                                    • Left: 138 pt
                                                                    • Bottom: 205 pt
                                                                    • Right: 391 pt
                                                                    • Anchoring: Left, Top
                                                                    Field Format:
                                                                    • Edit Box
                                                                    Field Behavior:
                                                                    • Allow field to be entered: In Find mode, In Browse mode
                                                                    • Touch keyboard type: Default for Data Type
                                                                    • Go to next field using: Tab key
                                                                    Yes

                                                                    Script Hierarchy

                                                                    ParseEmail
                                                                    ShowEmail
                                                                    Clear
                                                                    Load Test Email

                                                                    Next Script: [ShowEmail]
                                                                    Script NameParseEmail
                                                                    Run script with full access privilegesOff
                                                                    Include In MenuYes
                                                                    Layouts that use this script
                                                                    Scripts that use this script
                                                                      Script Definition
                                                                      Script Steps
                                                                      • Set Variable [ $email; Value:MBS("EmailParser.Parse"; Email Parser::Input) ]
                                                                      • If [ MBS("IsError") = 1 ]
                                                                      • Show Custom Dialog [ Title: "Failed to parse email."; Message: Middle($email; 7; Length($email)); Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                      • Exit Script [ ]
                                                                      • End If
                                                                      • #Show text:
                                                                      • Go to Layout [ “Email Parser” (Email Parser) ]
                                                                      • New Record/Request
                                                                      • Set Field [ Email Parser::Subject; MBS("EmailParser.Subject"; $email) ]
                                                                      • Set Field [ Email Parser::PlainText; MBS("EmailParser.plainText"; $email) ]
                                                                      • Set Field [ Email Parser::HTMLText; MBS("EmailParser.HTMLText"; $email) ]
                                                                      • Set Field [ Email Parser::Datum; MBS("EmailParser.SentDate"; $email) ]
                                                                      • Set Field [ Email Parser::EmailID; Get(RecordID) ]
                                                                      • Commit Records/Requests [ No dialog ]
                                                                      • #find all addresses
                                                                      • Set Variable [ $EmailRecordID; Value:Get(RecordID) ]
                                                                      • Set Variable [ $i; Value:0 ]
                                                                      • Set Variable [ $c; Value:MBS("EmailParser.AddressCount"; $email) ]
                                                                      • If [ $c > 0 ]
                                                                      • Go to Related Record [ From table: “Address”; Using layout: “Address” (Address) ] [ Show only related records ]
                                                                      • Go to Layout [ “Address” (Address) ]
                                                                      • Delete All Records [ No dialog ]
                                                                      • Loop
                                                                      • Set Variable [ $Name; Value:MBS("EmailParser.Address"; $email; $i; "name") ]
                                                                      • Set Variable [ $emailAddress; Value:MBS("EmailParser.Address"; $email; $i; "email") ]
                                                                      • Set Variable [ $type; Value:MBS("EmailParser.Address"; $email; $i; "type") ]
                                                                      • New Record/Request
                                                                      • Set Field [ Address::Type; $type ]
                                                                      • Set Field [ Address::Email; $emailAddress ]
                                                                      • Set Field [ Address::Name; $name ]
                                                                      • Set Field [ Address::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
                                                                      • #find all attachments
                                                                      • Set Variable [ $i; Value:0 ]
                                                                      • Set Variable [ $c; Value:MBS("EmailParser.AttachmentCount"; $email) ]
                                                                      • If [ $c > 0 ]
                                                                      • Go to Related Record [ From table: “Attachment”; Using layout: “Attachment” (Attachment) ] [ Show only related records ]
                                                                      • Go to Layout [ “Attachment” (Attachment) ]
                                                                      • Delete All Records [ No dialog ]
                                                                      • Loop
                                                                      • Set Variable [ $Name; Value:MBS("EmailParser.attachment"; $email; $i; "filename") ]
                                                                      • Set Variable [ $content; Value:MBS("EmailParser.attachment"; $email; $i; "container") ]
                                                                      • New Record/Request
                                                                      • Set Field [ Attachment::Content; $content ]
                                                                      • Set Field [ Attachment::FileName; $name ]
                                                                      • Set Field [ Attachment::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
                                                                      • #find all inline graphics
                                                                      • Set Variable [ $i; Value:0 ]
                                                                      • Set Variable [ $c; Value:MBS("EmailParser.InlineCount"; $email) ]
                                                                      • If [ $c > 0 ]
                                                                      • Go to Related Record [ From table: “InlineGraphics”; Using layout: “InlineGraphics” (InlineGraphics) ] [ Show only related records ]
                                                                      • 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 ]
                                                                      • Set Field [ InlineGraphics::CID; MBS( "EmailParser.Inline"; $email; $i; "contentId" ) ]
                                                                      • 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
                                                                      • Go to Layout [ “Email Parser” (Email Parser) ]
                                                                      • #find a header
                                                                      • Set Variable [ $i; Value:0 ]
                                                                      • Set Variable [ $c; Value:MBS("EmailParser.HeaderCount"; $email) ]
                                                                      • If [ $c > 0 ]
                                                                      • Loop
                                                                      • Set Variable [ $HeaderName; Value:MBS("EmailParser.Header"; $email; $i; "name") ]
                                                                      • If [ $HeaderName = "X-Mailer" ]
                                                                      • Set Variable [ $HeaderValue; Value:MBS("EmailParser.Header"; $email; $i; "value") ]
                                                                      • Set Field [ Email Parser::Mailer; $HeaderValue ]
                                                                      • End If
                                                                      • #next
                                                                      • Set Variable [ $i; Value:$i + 1 ]
                                                                      • Exit Loop If [ $i = $c ]
                                                                      • End Loop
                                                                      • End If
                                                                      • #cleanup
                                                                      • Set Variable [ $r; Value:MBS("EmailParser.Free"; $email) ]
                                                                      • Commit Records/Requests [ No dialog ]
                                                                      Fields used in this script
                                                                      Scripts used in this script
                                                                        Layouts used in this script
                                                                        Tables used in this script
                                                                        Table occurrences used by this script
                                                                        Custom Functions used by this script
                                                                          Custom menu set used by this script

                                                                            Previous Script: [ParseEmail]Next Script: [Clear]
                                                                            Script NameShowEmail
                                                                            Run script with full access privilegesOff
                                                                            Include In MenuYes
                                                                            Layouts that use this script
                                                                            Scripts that use this script
                                                                              Script Definition
                                                                              Script Steps
                                                                              • Set Variable [ $html; Value:Email Parser::HTMLText ]
                                                                              • Set Variable [ $html; Value:MBS("EmailParser.ProcessImageReferences"; Email Parser::HTMLText) ]
                                                                              • Set Variable [ $desktopPath; Value:MBS( "Folders.UserTemporary" ) ]
                                                                              • Set Variable [ $tempFolder; Value:MBS( "Path.AddPathComponent"; $desktopPath; "Email") ]
                                                                              • Set Variable [ $r; Value:MBS( "Files.CreateDirectory"; $tempFolder ) ]
                                                                              • Set Variable [ $htmlFile; Value:MBS( "Path.AddPathComponent"; $tempFolder; "email.html") ]
                                                                              • Set Variable [ $r; Value:MBS( "Text.WriteTextFile"; $html; $htmlFile ; "utf8" ) ]
                                                                              • Go to Related Record [ From table: “InlineGraphics”; Using layout: “InlineGraphics” (InlineGraphics) ]
                                                                              • If [ Get(LastError) = 0 ]
                                                                              • Go to Record/Request/Page [ First ]
                                                                              • Loop
                                                                              • Set Variable [ $name; Value:Substitute(InlineGraphics::CID; "/"; "-") ]
                                                                              • Set Variable [ $name; Value:MBS( "Text.RemovePrefix"; $name; "<" ) ]
                                                                              • Set Variable [ $name; Value:MBS( "Text.RemovePostfix"; $name; ">" ) ]
                                                                              • Set Variable [ $name; Value:"cid-" & $name ]
                                                                              • Set Variable [ $file; Value:MBS( "Path.AddPathComponent"; $tempFolder; $name) ]
                                                                              • Set Variable [ $r; Value:MBS( "Files.WriteFile"; InlineGraphics::Content; $file) ]
                                                                              • Go to Record/Request/Page [ Next; Exit after last ]
                                                                              • End Loop
                                                                              • If [ MBS("IsWindows") ]
                                                                              • Set Variable [ $htmlFile; Value:Substitute($htmlFile; "\\"; "/") ]
                                                                              • End If
                                                                              • End If
                                                                              • Go to Related Record [ From table: “Email Parser”; Using layout: “Email Parser” (Email Parser) ]
                                                                              • #allow file URLs for FileMaker 16 on Mac
                                                                              • Set Variable [ $htmlFile; Value:MBS( "Path.FilePathToFileURL"; $htmlFIle ) ]
                                                                              • Set Web Viewer [ Object Name: "web"; URL: $htmlFile ]
                                                                              Fields used in this script
                                                                              Scripts used in this script
                                                                                Layouts used in this script
                                                                                Tables used in this script
                                                                                Table occurrences used by this script
                                                                                Custom Functions used by this script
                                                                                  Custom menu set used by this script

                                                                                    Previous Script: [ShowEmail]Next Script: [Load Test Email]
                                                                                    Script NameClear
                                                                                    Run script with full access privilegesOff
                                                                                    Include In MenuYes
                                                                                    Layouts that use this script
                                                                                      Scripts that use this script
                                                                                        Script Definition
                                                                                        Script Steps
                                                                                        • Go to Layout [ “Address” (Address) ]
                                                                                        • Delete All Records [ No dialog ]
                                                                                        • Go to Layout [ “Attachment” (Attachment) ]
                                                                                        • Delete All Records [ No dialog ]
                                                                                        • Go to Layout [ “InlineGraphics” (InlineGraphics) ]
                                                                                        • Delete All Records [ No dialog ]
                                                                                        • Go to Layout [ “Email Parser” (Email Parser) ]
                                                                                        • Delete All Records [ No dialog ]
                                                                                        • Set Field [ Email Parser::Input; "" ]
                                                                                        • Commit Records/Requests [ No dialog ]
                                                                                        Fields used in this script
                                                                                        Scripts used in this script
                                                                                          Layouts used in this script
                                                                                          Tables used in this script
                                                                                          Table occurrences used by this script
                                                                                          Custom Functions used by this script
                                                                                            Custom menu set used by this script

                                                                                              Previous Script: [Clear]
                                                                                              Script NameLoad Test Email
                                                                                              Run script with full access privilegesOff
                                                                                              Include In MenuYes
                                                                                              Layouts that use this script
                                                                                              Scripts that use this script
                                                                                                Script Definition
                                                                                                Script Steps
                                                                                                • #Load test email from MBS Server
                                                                                                • #Start new session
                                                                                                • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                • #Set URL to load (HTTP, HTTPS, FTP, FTPS, SFTP, etc.)
                                                                                                • Set Variable [ $result; Value:MBS("CURL.SetOptionURL"; $curl; "http://monkeybreadsoftware.de/filemaker/testemail.eml") ]
                                                                                                • #RUN now
                                                                                                • Set Variable [ $r; Value:MBS("CURL.Perform"; $curl) ]
                                                                                                • #Check result
                                                                                                • Set Field [ Email Parser::Input; MBS("CURL.GetResultAsText"; $curl; "UTF8") ]
                                                                                                • #Cleanup
                                                                                                • Set Variable [ $result; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                Fields used in this script
                                                                                                Scripts used in this script
                                                                                                  Layouts used in this script
                                                                                                    Tables used in this script
                                                                                                    Table occurrences used by this script
                                                                                                    Custom Functions used by this script
                                                                                                      Custom menu set used by this script

                                                                                                        Download example: Email Parser and Preview

                                                                                                        Used functions: