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

MBS FileMaker Plugin Example Databases

IMAP Email

All examples are included with download of MBS FileMaker Plugin.

IMAP Email.fmp12

Overview
Tables 4
Relationships 3
Layouts 5
Scripts 12
Value Lists 0
Custom Functions 0
Custom Menus 24
File Options
Default custom menu set [Standard FileMaker Menus]
Default theme Apex Blue
When opening file
Minimum allowed version 12.0
Login using Account Name; Account= Admin
Allow user to save password Off
Require iOS passcode Off
Show Sign-in fields Off
Switch to layout Off
Hide all toolbars Off
Script triggers
OnFirstWindowOpen Off
OnLastWindowClose Off
OnWindowOpen Off
OnWindowClose Off
OnFileAVPlayerChange Off
OnWindowTransaction Off
Thumbnail Settings
Generate Thumbnails On; Temporary

 

Tables

Table Name
Statistics
Comments
Occurrences in Relationship Graph
IMAP Postbox
6 fields defined, 0 record
IMAP Postbox
IMAP EMails
16 fields defined, 0 record
IMAP EMails
Address
5 fields defined, 0 record
Address
Attachment
6 fields defined, 0 record
Attachment

Fields

Table Name: IMAP Postbox - 6 Fields
Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
Server URL Normal, Text Auto-Enter:
  • Allow editing
Validation:
  • Only during data entry
Storage:
  • Repetitions: 1
  • Indexing: None
  • Automatically create indexes as needed
  • Index Language: German
      Username Normal, Text Auto-Enter:
      • Allow editing
      Validation:
      • Only during data entry
      Storage:
      • Repetitions: 1
      • Indexing: None
      • Automatically create indexes as needed
      • Index Language: German
          Password Normal, Text Auto-Enter:
          • Allow editing
          Validation:
          • Only during data entry
          Storage:
          • Repetitions: 1
          • Indexing: None
          • Automatically create indexes as needed
          • Index Language: German
              JSON Normal, Text Auto-Enter:
              • Allow editing
              Validation:
              • Only during data entry
              Storage:
              • Repetitions: 1
              • Indexing: None
              • Automatically create indexes as needed
              • Index Language: German
                  Log Normal, Text Auto-Enter:
                  • Allow editing
                  Validation:
                  • Only during data entry
                  Storage:
                  • Repetitions: 1
                  • Indexing: None
                  • Automatically create indexes as needed
                  • Index Language: German
                      PostboxID Normal, Number Auto-Enter:
                      • Allow editing
                      • Serial: Generate: On creation, Next value: 12, Increment: 1
                      Validation:
                      • Only during data entry
                      Storage:
                      • Repetitions: 1
                      • Indexing: All
                      • Index Language: German

                          Table Name: IMAP EMails - 16 Fields
                          Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                          EmailID Normal, Number Auto-Enter:
                          • Allow editing
                          • Serial: Generate: On creation, Next value: 161, Increment: 1
                          Validation:
                          • Only during data entry
                          Storage:
                          • Repetitions: 1
                          • Indexing: All
                          • Index Language: German
                            PostboxID Normal, Number Auto-Enter:
                            • Allow editing
                            Validation:
                            • Only during data entry
                            Storage:
                            • Repetitions: 1
                            • Indexing: All
                            • Index Language: German
                              Subject Normal, Text Auto-Enter:
                              • Allow editing
                              Validation:
                              • Only during data entry
                              Storage:
                              • Repetitions: 1
                              • Indexing: None
                              • Automatically create indexes as needed
                              • Index Language: German
                                  From Normal, Text Auto-Enter:
                                  • Allow editing
                                  Validation:
                                  • Only during data entry
                                  Storage:
                                  • Repetitions: 1
                                  • Indexing: None
                                  • Automatically create indexes as needed
                                  • Index Language: German
                                      To Normal, Text Auto-Enter:
                                      • Allow editing
                                      Validation:
                                      • Only during data entry
                                      Storage:
                                      • Repetitions: 1
                                      • Indexing: None
                                      • Automatically create indexes as needed
                                      • Index Language: German
                                          Date Normal, Timestamp Auto-Enter:
                                          • Allow editing
                                          Validation:
                                          • Only during data entry
                                          Storage:
                                          • Repetitions: 1
                                          • Indexing: None
                                          • Automatically create indexes as needed
                                          • Index Language: German
                                              URL Normal, Text Auto-Enter:
                                              • Allow editing
                                              Validation:
                                              • Only during data entry
                                              Storage:
                                              • Repetitions: 1
                                              • Indexing: None
                                              • Automatically create indexes as needed
                                              • Index Language: German
                                                  UID Normal, Number Auto-Enter:
                                                  • Allow editing
                                                  Validation:
                                                  • Only during data entry
                                                  Storage:
                                                  • Repetitions: 1
                                                  • Indexing: All
                                                  • Index Language: German
                                                      JSON Normal, Text Auto-Enter:
                                                      • Allow editing
                                                      Validation:
                                                      • Only during data entry
                                                      Storage:
                                                      • Repetitions: 1
                                                      • Indexing: None
                                                      • Automatically create indexes as needed
                                                      • Index Language: German
                                                          Plain Text Normal, Text Auto-Enter:
                                                          • Allow editing
                                                          Validation:
                                                          • Only during data entry
                                                          Storage:
                                                          • Repetitions: 1
                                                          • Indexing: None
                                                          • Automatically create indexes as needed
                                                          • Index Language: German
                                                              HTML Text Normal, Text Auto-Enter:
                                                              • Allow editing
                                                              Validation:
                                                              • Only during data entry
                                                              Storage:
                                                              • Repetitions: 1
                                                              • Indexing: None
                                                              • Automatically create indexes as needed
                                                              • Index Language: German
                                                                  Source Normal, Text Auto-Enter:
                                                                  • Allow editing
                                                                  Validation:
                                                                  • Only during data entry
                                                                  Storage:
                                                                  • Repetitions: 1
                                                                  • Indexing: None
                                                                  • Automatically create indexes as needed
                                                                  • Index Language: German
                                                                      SendDate Normal, Timestamp Auto-Enter:
                                                                      • Allow editing
                                                                      Validation:
                                                                      • Only during data entry
                                                                      Storage:
                                                                      • Repetitions: 1
                                                                      • Indexing: None
                                                                      • Automatically create indexes as needed
                                                                      • Index Language: German
                                                                          ReceiveDate Normal, Timestamp Auto-Enter:
                                                                          • Allow editing
                                                                          Validation:
                                                                          • Only during data entry
                                                                          Storage:
                                                                          • Repetitions: 1
                                                                          • Indexing: None
                                                                          • Automatically create indexes as needed
                                                                          • Index Language: German
                                                                              Client App Normal, Text Auto-Enter:
                                                                              • Allow editing
                                                                              Validation:
                                                                              • Only during data entry
                                                                              Storage:
                                                                              • Repetitions: 1
                                                                              • Indexing: None
                                                                              • Automatically create indexes as needed
                                                                              • Index Language: German
                                                                                  Loaded Normal, Number Auto-Enter:
                                                                                  • Allow editing
                                                                                  Validation:
                                                                                  • Only during data entry
                                                                                  Storage:
                                                                                  • Repetitions: 1
                                                                                  • Indexing: None
                                                                                  • Automatically create indexes as needed
                                                                                  • Index Language: German

                                                                                      Table Name: Address - 5 Fields
                                                                                      Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                                                                                      Type Normal, Text Auto-Enter:
                                                                                      • Allow editing
                                                                                      Validation:
                                                                                      • Only during data entry
                                                                                      Storage:
                                                                                      • Repetitions: 1
                                                                                      • Indexing: None
                                                                                      • Automatically create indexes as needed
                                                                                      • Index Language: German
                                                                                          Name Normal, Text Auto-Enter:
                                                                                          • Allow editing
                                                                                          Validation:
                                                                                          • Only during data entry
                                                                                          Storage:
                                                                                          • Repetitions: 1
                                                                                          • Indexing: None
                                                                                          • Automatically create indexes as needed
                                                                                          • Index Language: German
                                                                                              Email Normal, Text Auto-Enter:
                                                                                              • Allow editing
                                                                                              Validation:
                                                                                              • Only during data entry
                                                                                              Storage:
                                                                                              • Repetitions: 1
                                                                                              • Indexing: None
                                                                                              • Automatically create indexes as needed
                                                                                              • Index Language: German
                                                                                                  EmailID Normal, Number Auto-Enter:
                                                                                                  • Allow editing
                                                                                                  Validation:
                                                                                                  • Only during data entry
                                                                                                  Storage:
                                                                                                  • Repetitions: 1
                                                                                                  • Indexing: All
                                                                                                  • Index Language: German
                                                                                                    AddressID Normal, Number Auto-Enter:
                                                                                                    • Allow editing
                                                                                                    • Serial: Generate: On creation, Next value: 118, Increment: 1
                                                                                                    Validation:
                                                                                                    • Only during data entry
                                                                                                    Storage:
                                                                                                    • Repetitions: 1
                                                                                                    • Indexing: None
                                                                                                    • Automatically create indexes as needed
                                                                                                    • Index Language: German

                                                                                                            Table Name: Attachment - 6 Fields
                                                                                                            Field Name Type Options Comments On Layouts In Relationships In Scripts In Value Lists
                                                                                                            EmailID Normal, Number Auto-Enter:
                                                                                                            • Allow editing
                                                                                                            Validation:
                                                                                                            • Only during data entry
                                                                                                            Storage:
                                                                                                            • Repetitions: 1
                                                                                                            • Indexing: All
                                                                                                            • Index Language: German
                                                                                                              Content Normal, Binary Auto-Enter:
                                                                                                              • Allow editing
                                                                                                              Validation:
                                                                                                              • Only during data entry
                                                                                                              Storage:
                                                                                                              • Repetitions: 1
                                                                                                                  FileName Normal, Text Auto-Enter:
                                                                                                                  • Allow editing
                                                                                                                  Validation:
                                                                                                                  • Only during data entry
                                                                                                                  Storage:
                                                                                                                  • Repetitions: 1
                                                                                                                  • Indexing: None
                                                                                                                  • Automatically create indexes as needed
                                                                                                                  • Index Language: German
                                                                                                                      Inline Normal, Number Auto-Enter:
                                                                                                                      • Allow editing
                                                                                                                      Validation:
                                                                                                                      • Only during data entry
                                                                                                                      Storage:
                                                                                                                      • Repetitions: 1
                                                                                                                      • Indexing: None
                                                                                                                      • Automatically create indexes as needed
                                                                                                                      • Index Language: German
                                                                                                                              AttachmentID Normal, Number Auto-Enter:
                                                                                                                              • Allow editing
                                                                                                                              • Serial: Generate: On creation, Next value: 89, Increment: 1
                                                                                                                              Validation:
                                                                                                                              • Only during data entry
                                                                                                                              Storage:
                                                                                                                              • Repetitions: 1
                                                                                                                              • Indexing: None
                                                                                                                              • Automatically create indexes as needed
                                                                                                                              • Index Language: German
                                                                                                                                      contentId Normal, Text Auto-Enter:
                                                                                                                                      • Allow editing
                                                                                                                                      Validation:
                                                                                                                                      • Only during data entry
                                                                                                                                      Storage:
                                                                                                                                      • Repetitions: 1
                                                                                                                                      • Indexing: None
                                                                                                                                      • Automatically create indexes as needed
                                                                                                                                      • Index Language: German

                                                                                                                                          Relationship: IMAP EMails=Address

                                                                                                                                          Table Occurrence IMAP EMails Address
                                                                                                                                          Field EmailID = EmailID
                                                                                                                                          Source Table IMAP EMails Address
                                                                                                                                          Source File IMAP Email.fmp12 IMAP Email.fmp12
                                                                                                                                          Allow creation of records via this relationship Off Off
                                                                                                                                          Delete related records in this table when a record is deleted in the other table Off On
                                                                                                                                          Sort records

                                                                                                                                          Off

                                                                                                                                          Off

                                                                                                                                          Relationship: Attachment=IMAP EMails

                                                                                                                                          Table Occurrence Attachment IMAP EMails
                                                                                                                                          Field EmailID = EmailID
                                                                                                                                          Source Table Attachment IMAP EMails
                                                                                                                                          Source File IMAP Email.fmp12 IMAP Email.fmp12
                                                                                                                                          Allow creation of records via this relationship Off Off
                                                                                                                                          Delete related records in this table when a record is deleted in the other table On Off
                                                                                                                                          Sort records

                                                                                                                                          Off

                                                                                                                                          Off

                                                                                                                                          Layouts

                                                                                                                                          Layout Hierarchy

                                                                                                                                          IMAP Postbox
                                                                                                                                          IMAP EMails
                                                                                                                                          Address
                                                                                                                                          Attachment


                                                                                                                                          Layout Name Include In Menu Quick Find # of Objects Show Records From Save record changes automatically Show field frames when record is active Show field frames only on current record Show current record indicator in List View Used in Scripts Custom Menu Set Script Triggers Theme ID
                                                                                                                                          IMAP Postbox Yes Yes IMAP Postbox On Off On Off [File Default] 01
                                                                                                                                          IMAP EMails Yes Yes IMAP EMails On Off On On [File Default] 01
                                                                                                                                          Address Yes Yes Address On Off On On [File Default] 01
                                                                                                                                          Attachment Yes Yes Attachment On Off On On [File Default] 01

                                                                                                                                          Layout Objects: IMAP Postbox

                                                                                                                                          Regular Fields

                                                                                                                                          Field Name: IMAP Postbox::Server URL
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 52 pt
                                                                                                                                          • Left: 138 pt
                                                                                                                                          • Bottom: 73 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

                                                                                                                                          Field Name: IMAP Postbox::Username
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 75 pt
                                                                                                                                          • Left: 138 pt
                                                                                                                                          • Bottom: 96 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

                                                                                                                                          Field Name: IMAP Postbox::Password
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 98 pt
                                                                                                                                          • Left: 138 pt
                                                                                                                                          • Bottom: 119 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

                                                                                                                                          Field Name: IMAP EMails::Subject
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 185 pt
                                                                                                                                          • Left: 18 pt
                                                                                                                                          • Bottom: 206 pt
                                                                                                                                          • Right: 269 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

                                                                                                                                          Field Name: IMAP EMails::From
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 185 pt
                                                                                                                                          • Left: 271 pt
                                                                                                                                          • Bottom: 206 pt
                                                                                                                                          • Right: 522 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

                                                                                                                                          Field Name: IMAP EMails::To
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 185 pt
                                                                                                                                          • Left: 524 pt
                                                                                                                                          • Bottom: 206 pt
                                                                                                                                          • Right: 775 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

                                                                                                                                          Field Name: IMAP EMails::Date
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 185 pt
                                                                                                                                          • Left: 777 pt
                                                                                                                                          • Bottom: 206 pt
                                                                                                                                          • Right: 933 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

                                                                                                                                          Field Name: IMAP Postbox::JSON
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 155 pt
                                                                                                                                          • Left: 43 pt
                                                                                                                                          • Bottom: 557 pt
                                                                                                                                          • Right: 535 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

                                                                                                                                          Field Name: IMAP Postbox::Log
                                                                                                                                          Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                          • Top: 155 pt
                                                                                                                                          • Left: 550 pt
                                                                                                                                          • Bottom: 557 pt
                                                                                                                                          • Right: 1042 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

                                                                                                                                          Buttons

                                                                                                                                          Button Properties Coordinates Script/Script Step
                                                                                                                                            Type:
                                                                                                                                          • Text: Load Email List
                                                                                                                                          • Top: 68 pt
                                                                                                                                          • Left: 444 pt
                                                                                                                                          • Bottom: 96 pt
                                                                                                                                          • Right: 600 pt
                                                                                                                                          • Anchoring: Left, Top
                                                                                                                                          Perform Script [ “Load List” ]

                                                                                                                                          Scripts:


                                                                                                                                          Button Properties Coordinates Script/Script Step
                                                                                                                                            Type:
                                                                                                                                          • Text: Load Email
                                                                                                                                          • Top: 186 pt
                                                                                                                                          • Left: 937 pt
                                                                                                                                          • Bottom: 208 pt
                                                                                                                                          • Right: 1035 pt
                                                                                                                                          • Anchoring: Left, Top
                                                                                                                                          Perform Script [ “Load Email”; Parameter: IMAP EMails::EmailID ]

                                                                                                                                          Scripts:

                                                                                                                                          Fields:


                                                                                                                                          Button Properties Coordinates Script/Script Step
                                                                                                                                            Type:
                                                                                                                                          • Text: Import Email Files
                                                                                                                                          • Top: 73 pt
                                                                                                                                          • Left: 884 pt
                                                                                                                                          • Bottom: 101 pt
                                                                                                                                          • Right: 1040 pt
                                                                                                                                          • Anchoring: Left, Top
                                                                                                                                          Perform Script [ “Import Email Files” ]

                                                                                                                                          Scripts:


                                                                                                                                          Portals

                                                                                                                                          Portal Properties Coordinates Fields Options
                                                                                                                                          • Top: 182 pt
                                                                                                                                          • Left: 15 pt
                                                                                                                                          • Bottom: 562 pt
                                                                                                                                          • Right: 1066 pt
                                                                                                                                          • Anchoring: Left, Top
                                                                                                                                          Field Objects
                                                                                                                                          • Sort records: Off
                                                                                                                                          • Filter calculation: None
                                                                                                                                          • Initial Row: 1
                                                                                                                                          • Number of Rows: 16

                                                                                                                                          Tab Controls

                                                                                                                                          Tab Control Properties Coordinates
                                                                                                                                            Justification:
                                                                                                                                          • Left
                                                                                                                                            Tab Width:
                                                                                                                                            Default Front Tab:
                                                                                                                                          • Tab 0
                                                                                                                                          • Top: 122 pt
                                                                                                                                          • Left: 8 pt
                                                                                                                                          • Bottom: 565 pt
                                                                                                                                          • Right: 1078 pt
                                                                                                                                          • Anchoring: Left, Top
                                                                                                                                          Tabs
                                                                                                                                          Tab Properties Tab Controls Slide Controls Fields Buttons Portals Web Viewer Controls Charts
                                                                                                                                            Tab 0:
                                                                                                                                          • "Emails"
                                                                                                                                              Field Objects
                                                                                                                                                Tab 1:
                                                                                                                                              • "Debug"
                                                                                                                                                  Field Objects

                                                                                                                                                  Layout Objects: IMAP EMails

                                                                                                                                                  Regular Fields

                                                                                                                                                  Field Name: IMAP EMails::Subject
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 85 pt
                                                                                                                                                  • Left: 104 pt
                                                                                                                                                  • Bottom: 106 pt
                                                                                                                                                  • Right: 513 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

                                                                                                                                                  Field Name: IMAP EMails::Date
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 106 pt
                                                                                                                                                  • Left: 104 pt
                                                                                                                                                  • Bottom: 127 pt
                                                                                                                                                  • Right: 513 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

                                                                                                                                                  Field Name: IMAP EMails::SendDate
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 127 pt
                                                                                                                                                  • Left: 104 pt
                                                                                                                                                  • Bottom: 148 pt
                                                                                                                                                  • Right: 513 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

                                                                                                                                                  Field Name: IMAP EMails::ReceiveDate
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 150 pt
                                                                                                                                                  • Left: 104 pt
                                                                                                                                                  • Bottom: 171 pt
                                                                                                                                                  • Right: 513 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

                                                                                                                                                  Field Name: IMAP EMails::Plain Text
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 173 pt
                                                                                                                                                  • Left: 104 pt
                                                                                                                                                  • Bottom: 338 pt
                                                                                                                                                  • Right: 513 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

                                                                                                                                                  Field Name: IMAP EMails::HTML Text
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 343 pt
                                                                                                                                                  • Left: 104 pt
                                                                                                                                                  • Bottom: 508 pt
                                                                                                                                                  • Right: 513 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

                                                                                                                                                  Field Name: Address::Type
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 88 pt
                                                                                                                                                  • Left: 521 pt
                                                                                                                                                  • Bottom: 109 pt
                                                                                                                                                  • Right: 593 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

                                                                                                                                                  Field Name: Address::Name
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 88 pt
                                                                                                                                                  • Left: 601 pt
                                                                                                                                                  • Bottom: 109 pt
                                                                                                                                                  • Right: 763 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

                                                                                                                                                  Field Name: Address::Email
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 88 pt
                                                                                                                                                  • Left: 763 pt
                                                                                                                                                  • Bottom: 109 pt
                                                                                                                                                  • Right: 1009 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

                                                                                                                                                  Field Name: IMAP EMails::Client App
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 513 pt
                                                                                                                                                  • Left: 104 pt
                                                                                                                                                  • Bottom: 534 pt
                                                                                                                                                  • Right: 513 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

                                                                                                                                                  Field Name: Attachment::Content
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 247 pt
                                                                                                                                                  • Left: 521 pt
                                                                                                                                                  • Bottom: 341 pt
                                                                                                                                                  • Right: 763 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
                                                                                                                                                  No

                                                                                                                                                  Field Name: Attachment::FileName
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 247 pt
                                                                                                                                                  • Left: 765 pt
                                                                                                                                                  • Bottom: 268 pt
                                                                                                                                                  • Right: 1006 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

                                                                                                                                                  Field Name: Attachment::contentId
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 268 pt
                                                                                                                                                  • Left: 763 pt
                                                                                                                                                  • Bottom: 289 pt
                                                                                                                                                  • Right: 1006 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

                                                                                                                                                  Field Name: IMAP EMails::EmailID
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 82 pt
                                                                                                                                                  • Left: 73 pt
                                                                                                                                                  • Bottom: 103 pt
                                                                                                                                                  • Right: 152 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

                                                                                                                                                  Field Name: IMAP EMails::PostboxID
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 83 pt
                                                                                                                                                  • Left: 235 pt
                                                                                                                                                  • Bottom: 104 pt
                                                                                                                                                  • Right: 314 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

                                                                                                                                                  Field Name: IMAP EMails::UID
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 82 pt
                                                                                                                                                  • Left: 362 pt
                                                                                                                                                  • Bottom: 103 pt
                                                                                                                                                  • Right: 441 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

                                                                                                                                                  Field Name: IMAP EMails::JSON
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 112 pt
                                                                                                                                                  • Left: 73 pt
                                                                                                                                                  • Bottom: 439 pt
                                                                                                                                                  • Right: 441 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

                                                                                                                                                  Field Name: IMAP EMails::From
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 447 pt
                                                                                                                                                  • Left: 73 pt
                                                                                                                                                  • Bottom: 468 pt
                                                                                                                                                  • Right: 441 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

                                                                                                                                                  Field Name: IMAP EMails::To
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 470 pt
                                                                                                                                                  • Left: 73 pt
                                                                                                                                                  • Bottom: 491 pt
                                                                                                                                                  • Right: 441 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

                                                                                                                                                  Field Name: IMAP EMails::URL
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 493 pt
                                                                                                                                                  • Left: 73 pt
                                                                                                                                                  • Bottom: 514 pt
                                                                                                                                                  • Right: 441 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

                                                                                                                                                  Field Name: IMAP EMails::Source
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 83 pt
                                                                                                                                                  • Left: 522 pt
                                                                                                                                                  • Bottom: 556 pt
                                                                                                                                                  • Right: 1005 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

                                                                                                                                                  Field Name: IMAP EMails::Loaded
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 522 pt
                                                                                                                                                  • Left: 73 pt
                                                                                                                                                  • Bottom: 543 pt
                                                                                                                                                  • Right: 152 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

                                                                                                                                                  Field Name: IMAP EMails::Subject
                                                                                                                                                  Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                  • Top: 82 pt
                                                                                                                                                  • Left: 13 pt
                                                                                                                                                  • Bottom: 106 pt
                                                                                                                                                  • Right: 1011 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

                                                                                                                                                  Buttons

                                                                                                                                                  Button Properties Coordinates Script/Script Step
                                                                                                                                                    Type:
                                                                                                                                                  • Text: Load Email
                                                                                                                                                  • Top: 129 pt
                                                                                                                                                  • Left: 415 pt
                                                                                                                                                  • Bottom: 151 pt
                                                                                                                                                  • Right: 513 pt
                                                                                                                                                  • Anchoring: Left, Top
                                                                                                                                                  Perform Script [ “Load Email”; Parameter: IMAP EMails::EmailID ]

                                                                                                                                                  Scripts:

                                                                                                                                                  Fields:


                                                                                                                                                  Button Properties Coordinates Script/Script Step
                                                                                                                                                    Type:
                                                                                                                                                  • Text: Back
                                                                                                                                                  • Top: 6 pt
                                                                                                                                                  • Left: 11 pt
                                                                                                                                                  • Bottom: 44 pt
                                                                                                                                                  • Right: 148 pt
                                                                                                                                                  • Anchoring: Left, Top
                                                                                                                                                  Go to Layout [ “IMAP Postbox” (IMAP Postbox) ]

                                                                                                                                                  Layouts:


                                                                                                                                                  Button Properties Coordinates Script/Script Step
                                                                                                                                                    Type:
                                                                                                                                                  • Text: Delete Email
                                                                                                                                                  • Top: 6 pt
                                                                                                                                                  • Left: 869 pt
                                                                                                                                                  • Bottom: 44 pt
                                                                                                                                                  • Right: 1006 pt
                                                                                                                                                  • Anchoring: Left, Top
                                                                                                                                                  Perform Script [ “Delete Email” ]

                                                                                                                                                  Scripts:


                                                                                                                                                  Portals

                                                                                                                                                  Portal Properties Coordinates Fields Options
                                                                                                                                                  • Top: 85 pt
                                                                                                                                                  • Left: 518 pt
                                                                                                                                                  • Bottom: 237 pt
                                                                                                                                                  • Right: 1012 pt
                                                                                                                                                  • Anchoring: Left, Top
                                                                                                                                                  Field Objects
                                                                                                                                                  • Sort records: Off
                                                                                                                                                  • Filter calculation: None
                                                                                                                                                  • Initial Row: 1
                                                                                                                                                  • Number of Rows: 6

                                                                                                                                                  Portal Properties Coordinates Fields Options
                                                                                                                                                  • Top: 244 pt
                                                                                                                                                  • Left: 518 pt
                                                                                                                                                  • Bottom: 534 pt
                                                                                                                                                  • Right: 1009 pt
                                                                                                                                                  • Anchoring: Left, Top
                                                                                                                                                  Field Objects
                                                                                                                                                  • Sort records: Off
                                                                                                                                                  • Filter calculation: None
                                                                                                                                                  • Initial Row: 1
                                                                                                                                                  • Number of Rows: 3
                                                                                                                                                  • Show vertical scroll bar

                                                                                                                                                  Tab Controls

                                                                                                                                                  Tab Control Properties Coordinates
                                                                                                                                                    Justification:
                                                                                                                                                  • Left
                                                                                                                                                    Tab Width:
                                                                                                                                                    Default Front Tab:
                                                                                                                                                  • Tab 0
                                                                                                                                                  • Top: 54 pt
                                                                                                                                                  • Left: 6 pt
                                                                                                                                                  • Bottom: 564 pt
                                                                                                                                                  • Right: 1018 pt
                                                                                                                                                  • Anchoring: Left, Top
                                                                                                                                                  Tabs
                                                                                                                                                  Tab Properties Tab Controls Slide Controls Fields Buttons Portals Web Viewer Controls Charts
                                                                                                                                                    Tab 0:
                                                                                                                                                  • "Email"
                                                                                                                                                    Object Name:
                                                                                                                                                  • EmailTab
                                                                                                                                                      Field Objects
                                                                                                                                                    • Text: Load Email-->Perform Script [ “Load Email”; Parameter: IMAP EMails::EmailID ] at (129, 415, 151, 513)
                                                                                                                                                      • Tab 1:
                                                                                                                                                      • "Debug"
                                                                                                                                                        Object Name:
                                                                                                                                                      • DebugTab
                                                                                                                                                          Field Objects
                                                                                                                                                            Tab 2:
                                                                                                                                                          • "Preview"
                                                                                                                                                            Object Name:
                                                                                                                                                          • PreviewTab
                                                                                                                                                              Field Objects 1 Web Viewer Controls

                                                                                                                                                              Graphic Objects

                                                                                                                                                              Graphic Object Properties Coordinates
                                                                                                                                                                Type:
                                                                                                                                                              • Text: SendDate
                                                                                                                                                              • Top: 130 pt
                                                                                                                                                              • Left: 34 pt
                                                                                                                                                              • Bottom: 146 pt
                                                                                                                                                              • Right: 93 pt
                                                                                                                                                              • Anchoring: Left, Top

                                                                                                                                                              Graphic Object Properties Coordinates
                                                                                                                                                                Type:
                                                                                                                                                              • Text: ReceiveDate
                                                                                                                                                              • Top: 153 pt
                                                                                                                                                              • Left: 19 pt
                                                                                                                                                              • Bottom: 169 pt
                                                                                                                                                              • Right: 93 pt
                                                                                                                                                              • Anchoring: Left, Top

                                                                                                                                                              Graphic Object Properties Coordinates
                                                                                                                                                                Type:
                                                                                                                                                              • Text: Plain Text
                                                                                                                                                              • Top: 176 pt
                                                                                                                                                              • Left: 36 pt
                                                                                                                                                              • Bottom: 192 pt
                                                                                                                                                              • Right: 95 pt
                                                                                                                                                              • Anchoring: Left, Top

                                                                                                                                                              Graphic Object Properties Coordinates
                                                                                                                                                                Type:
                                                                                                                                                              • Text: HTML Text
                                                                                                                                                              • Top: 346 pt
                                                                                                                                                              • Left: 30 pt
                                                                                                                                                              • Bottom: 362 pt
                                                                                                                                                              • Right: 95 pt
                                                                                                                                                              • Anchoring: Left, Top

                                                                                                                                                              Graphic Object Properties Coordinates
                                                                                                                                                                Type:
                                                                                                                                                              • Text: Client App
                                                                                                                                                              • Top: 516 pt
                                                                                                                                                              • Left: 32 pt
                                                                                                                                                              • Bottom: 532 pt
                                                                                                                                                              • Right: 93 pt
                                                                                                                                                              • Anchoring: Left, Top

                                                                                                                                                              Web Viewer Controls

                                                                                                                                                              Web Viewer Control Properties Coordinates Web Address
                                                                                                                                                                Object Name:
                                                                                                                                                              • web
                                                                                                                                                                Additional Properties:
                                                                                                                                                              • Allow interaction with web viewer content
                                                                                                                                                              • Display progress bar
                                                                                                                                                              • Display status messages
                                                                                                                                                              • Automatically encode URL
                                                                                                                                                              • Top: 110 pt
                                                                                                                                                              • Left: 13 pt
                                                                                                                                                              • Bottom: 555 pt
                                                                                                                                                              • Right: 1010 pt
                                                                                                                                                              • Anchoring: Left, Top
                                                                                                                                                              "about:blank"

                                                                                                                                                              Layout Objects: Address

                                                                                                                                                              Regular Fields

                                                                                                                                                              Field Name: Address::Type
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 52 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 73 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

                                                                                                                                                              Field Name: Address::Name
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 75 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 96 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

                                                                                                                                                              Field Name: Address::Email
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 98 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 119 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

                                                                                                                                                              Field Name: Address::EmailID
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 121 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 142 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: Default for Data Type
                                                                                                                                                              • Go to next field using: Tab key
                                                                                                                                                              Yes

                                                                                                                                                              Layout Objects: Attachment

                                                                                                                                                              Regular Fields

                                                                                                                                                              Field Name: Attachment::EmailID
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 52 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 73 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: Default for Data Type
                                                                                                                                                              • Go to next field using: Tab key
                                                                                                                                                              Yes

                                                                                                                                                              Field Name: Attachment::Content
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 75 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 200 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
                                                                                                                                                              No

                                                                                                                                                              Field Name: Attachment::FileName
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 202 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 223 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

                                                                                                                                                              Field Name: Attachment::contentId
                                                                                                                                                              Field Properties Coordinates Field Format Field Behavior Quick Find
                                                                                                                                                              • Top: 225 pt
                                                                                                                                                              • Left: 138 pt
                                                                                                                                                              • Bottom: 246 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

                                                                                                                                                              Clear
                                                                                                                                                              Load List
                                                                                                                                                              Load Email
                                                                                                                                                              ParseEmail
                                                                                                                                                              ShowPreview Trigger
                                                                                                                                                              ShowPreview
                                                                                                                                                              Text to Webviewer
                                                                                                                                                              Delete Email
                                                                                                                                                              List Folders
                                                                                                                                                              Delete local EMails
                                                                                                                                                              Setup CURL
                                                                                                                                                              Import Email Files

                                                                                                                                                              Next Script: [Load List]
                                                                                                                                                              Script Name Clear
                                                                                                                                                              Run script with full access privileges Off
                                                                                                                                                              Siri Shortcut Visible Off
                                                                                                                                                              Include In Menu Yes
                                                                                                                                                              Layouts that use this script
                                                                                                                                                                Scripts that use this script
                                                                                                                                                                  Script Definition
                                                                                                                                                                  Script Steps
                                                                                                                                                                  • // Truncate Table [ No dialog; Table: “IMAP Postbox” ]
                                                                                                                                                                  • Truncate Table [ No dialog; Table: “IMAP EMails” ]
                                                                                                                                                                  • Truncate Table [ No dialog; Table: “Address” ]
                                                                                                                                                                  • Truncate Table [ No dialog; Table: “Attachment” ]
                                                                                                                                                                  • Set Field [ IMAP Postbox::Log; "" ]
                                                                                                                                                                  • Set Field [ IMAP Postbox::JSON; "" ]
                                                                                                                                                                  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] Next Script: [Load Email]
                                                                                                                                                                          Script Name Load List
                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                          Include In Menu No
                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                          Scripts that use this script
                                                                                                                                                                            Script Definition
                                                                                                                                                                            Script Steps
                                                                                                                                                                            • Go to Layout [ “IMAP Postbox” (IMAP Postbox) ]
                                                                                                                                                                            • # query list of emails
                                                                                                                                                                            • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                                            • Perform Script [ “Setup CURL”; Parameter: $curl ]
                                                                                                                                                                            • #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.Cleanup"; $curl) ]
                                                                                                                                                                            • Set Field [ IMAP Postbox::Log; $debug ]
                                                                                                                                                                            • Set Field [ IMAP Postbox::JSON; $list ]
                                                                                                                                                                            • If [ $result = "OK" ]
                                                                                                                                                                            • #And we create records for emails
                                                                                                                                                                            • Set Variable [ $PostBoxID; Value:IMAP Postbox::PostboxID ]
                                                                                                                                                                            • Go to Layout [ “IMAP EMails” (IMAP EMails) ]
                                                                                                                                                                            • #optionally delete all existsing local emails
                                                                                                                                                                            • // Set Variable [ $r; Value:MBS( "FM.DeleteRecords"; Get(FileName); "IMAP EMails"; "PostboxID"; IMAP Postbox::PostboxID ) ]
                                                                                                                                                                            • #for performance, parse once and cache
                                                                                                                                                                            • Set Variable [ $jsonList; Value:MBS( "JSON.Parse"; $list ) ]
                                                                                                                                                                            • If [ MBS("IsError") = 0 ]
                                                                                                                                                                            • Set Variable [ $count; Value:MBS( "JSON.GetArraySize"; $jsonList) ]
                                                                                                                                                                            • If [ $count > 0 ]
                                                                                                                                                                            • Set Variable [ $index; Value:0 ]
                                                                                                                                                                            • Loop [ Flush: Always ]
                                                                                                                                                                            • Set Variable [ $jsonItem; Value:MBS( "JSON.GetArrayItem"; $jsonList; $index; 1) ]
                                                                                                                                                                            • Set Variable [ $UID; Value:MBS( "JSON.GetPathItem"; $jsonItem; "UID"; 1+2) ]
                                                                                                                                                                            • #check whether we have an email with same UID already
                                                                                                                                                                            • Set Variable [ $found; Value:MBS( "FM.ExecuteFileSQL"; Get(FileName); "SELECT COUNT(*) FROM \"IMAP Emails\" WHERE UID=?"; 9; 13; $UID) ]
                                                                                                                                                                            • If [ $found ≠ 1 ]
                                                                                                                                                                            • Set Variable [ $Date; Value:MBS( "JSON.GetPathItem"; $jsonItem; "Date"; 1+2) ]
                                                                                                                                                                            • Set Variable [ $Subject; Value:MBS( "JSON.GetPathItem"; $jsonItem; "Subject"; 1+2) ]
                                                                                                                                                                            • Set Variable [ $URL; Value:MBS( "JSON.GetPathItem"; $jsonItem; "URL"; 1+2) ]
                                                                                                                                                                            • Set Variable [ $jsonAddresses; Value:MBS( "JSON.GetObjectItem"; $jsonItem; "Addresses"; 1) ]
                                                                                                                                                                            • Set Variable [ $To; Value:"" ]
                                                                                                                                                                            • Set Variable [ $From; Value:"" ]
                                                                                                                                                                            • #collect all TO and FROM into a local variable
                                                                                                                                                                            • If [ MBS("IsError") = 0 ]
                                                                                                                                                                            • Set Variable [ $AddressCount; Value:MBS( "JSON.GetArraySize"; $jsonAddresses) ]
                                                                                                                                                                            • If [ $AddressCount > 0 ]
                                                                                                                                                                            • Set Variable [ $AddressIndex; Value:0 ]
                                                                                                                                                                            • Loop [ Flush: Always ]
                                                                                                                                                                            • Set Variable [ $jsonAddress; Value:MBS( "JSON.GetArrayItem"; $jsonAddresses; $Addressindex; 1) ]
                                                                                                                                                                            • Set Variable [ $Name; Value:MBS( "JSON.GetPathItem"; $jsonAddress; "Name"; 1+2) ]
                                                                                                                                                                            • Set Variable [ $Type; Value:MBS( "JSON.GetPathItem"; $jsonAddress; "Type"; 1+2) ]
                                                                                                                                                                            • Set Variable [ $Email; Value:MBS( "JSON.GetPathItem"; $jsonAddress; "Email"; 1+2) ]
                                                                                                                                                                            • If [ $Type = "To" ]
                                                                                                                                                                            • Set Variable [ $To; Value:$To & If(Length($To)>0; ", "; "") & If(Length($Name) > 0; $Name & " (" & $Email & ")"; $Email) ]
                                                                                                                                                                            • Else If [ $Type = "from" ]
                                                                                                                                                                            • Set Variable [ $from; Value:$From & If(Length($From)>0; ", "; "") & If(Length($Name) > 0; $Name & " (" & $Email & ")"; $Email) ]
                                                                                                                                                                            • End If
                                                                                                                                                                            • #next
                                                                                                                                                                            • Set Variable [ $AddressIndex; Value:$AddressIndex + 1 ]
                                                                                                                                                                            • Exit Loop If [ $AddressIndex ≥ $AddressCount ]
                                                                                                                                                                            • End Loop
                                                                                                                                                                            • End If
                                                                                                                                                                            • End If
                                                                                                                                                                            • #create new record for this email
                                                                                                                                                                            • Set Variable [ $json ]
                                                                                                                                                                            • New Record/Request
                                                                                                                                                                            • Set Field [ IMAP EMails::Loaded; 0 ]
                                                                                                                                                                            • Set Field [ IMAP EMails::Subject; $subject ]
                                                                                                                                                                            • Set Field [ IMAP EMails::From; $From ]
                                                                                                                                                                            • Set Field [ IMAP EMails::To; $To ]
                                                                                                                                                                            • Set Field [ IMAP EMails::Date; $Date ]
                                                                                                                                                                            • Set Field [ IMAP EMails::URL; $URL ]
                                                                                                                                                                            • Set Field [ IMAP EMails::UID; $UID ]
                                                                                                                                                                            • Set Field [ IMAP EMails::PostboxID; $PostboxID ]
                                                                                                                                                                            • Set Field [ IMAP EMails::JSON; MBS("JSON.Colorize"; MBS("JSON.Format"; $jsonItem)) ]
                                                                                                                                                                            • Commit Records/Requests
                                                                                                                                                                            • Set Variable [ $r; Value:MBS( "JSON.Release"; $jsonAddresses ) ]
                                                                                                                                                                            • End If
                                                                                                                                                                            • Set Variable [ $r; Value:MBS( "JSON.Release"; $jsonItem ) ]
                                                                                                                                                                            • #next
                                                                                                                                                                            • Set Variable [ $index; Value:$index + 1 ]
                                                                                                                                                                            • Exit Loop If [ $index ≥ $count ]
                                                                                                                                                                            • End Loop
                                                                                                                                                                            • End If
                                                                                                                                                                            • Set Variable [ $r; Value:MBS( "JSON.Release"; $jsonList ) ]
                                                                                                                                                                            • End If
                                                                                                                                                                            • Else [ ]
                                                                                                                                                                            • Show Custom Dialog [ Title: "Failed to load emails"; Message: $result; Default Button: “OK”, Commit: “Yes” ]
                                                                                                                                                                            • End If
                                                                                                                                                                            • Go to Layout [ “IMAP Postbox” (IMAP Postbox) ]
                                                                                                                                                                            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: [Load List] Next Script: [ParseEmail]
                                                                                                                                                                                Script Name Load Email
                                                                                                                                                                                Run script with full access privileges Off
                                                                                                                                                                                Siri Shortcut Visible Off
                                                                                                                                                                                Include In Menu Yes
                                                                                                                                                                                Layouts that use this script
                                                                                                                                                                                Scripts that use this script
                                                                                                                                                                                  Script Definition
                                                                                                                                                                                  Script Steps
                                                                                                                                                                                  • Freeze Window
                                                                                                                                                                                  • Set Variable [ $EmailID; Value:Get(ScriptParameter) ]
                                                                                                                                                                                  • If [ Length ( $EmailID ) = 0 ]
                                                                                                                                                                                  • Exit Script [ Result: "No ID?" ]
                                                                                                                                                                                  • End If
                                                                                                                                                                                  • Set Variable [ $PostBoxID; Value:IMAP Postbox::PostboxID ]
                                                                                                                                                                                  • Set Variable [ $URL; Value:IMAP EMails::URL ]
                                                                                                                                                                                  • If [ IsEmpty ( $URL ) and (IMAP EMails::Loaded ≠ 1) ]
                                                                                                                                                                                  • Show Custom Dialog [ Title: "Failed to load email"; Message: "No URL for Email?"; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                  • Exit Script [ Result: "No URL for Email?" ]
                                                                                                                                                                                  • End If
                                                                                                                                                                                  • Go to Related Record [ From table: “IMAP EMails”; Using layout: “IMAP EMails” (IMAP EMails) ] [ Show only related records ]
                                                                                                                                                                                  • Set Variable [ $lastError; Value:Get(LastError) ]
                                                                                                                                                                                  • If [ $lastError ≠ 0 ]
                                                                                                                                                                                  • Show Custom Dialog [ Message: "Fehler: " & $lastError; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                  • End If
                                                                                                                                                                                  • If [ IMAP EMails::Loaded ≠ 1 ]
                                                                                                                                                                                  • # get the email if we don't have it
                                                                                                                                                                                  • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                                                  • Perform Script [ “Setup CURL”; Parameter: $curl ]
                                                                                                                                                                                  • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; $URL) ]
                                                                                                                                                                                  • Set Variable [ $result; Value:MBS("CURL.Perform"; $curl) ]
                                                                                                                                                                                  • Set Variable [ $output; Value:MBS("CURL.GetResultAsText"; $curl) ]
                                                                                                                                                                                  • Set Field [ IMAP EMails::Source; $output ]
                                                                                                                                                                                  • Set Field [ IMAP Postbox::Log; MBS("CURL.GetDebugMessages"; $curl; "UTF-8") ]
                                                                                                                                                                                  • If [ $result ≠ "OK" ]
                                                                                                                                                                                  • Show Custom Dialog [ Title: "Failed to load an email."; Message: "See error log field for details."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                                                                                  • Else [ ]
                                                                                                                                                                                  • # parse email
                                                                                                                                                                                  • Set Variable [ $EmailRef; Value:MBS("CURL.GetResultAsEmail"; $curl) ]
                                                                                                                                                                                  • If [ MBS("IsError") ]
                                                                                                                                                                                  • Show Custom Dialog [ Title: "Failed to get an email."; Message: "See error log field for details."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                                                                                  • Else [ ]
                                                                                                                                                                                  • Perform Script [ “ParseEmail”; Parameter: $EmailRef ]
                                                                                                                                                                                  • End If
                                                                                                                                                                                  • End If
                                                                                                                                                                                  • Set Variable [ $r; Value:MBS("CURL.Release"; $curl) ]
                                                                                                                                                                                  • End If
                                                                                                                                                                                  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: [Load Email] Next Script: [ShowPreview Trigger]
                                                                                                                                                                                      Script Name ParseEmail
                                                                                                                                                                                      Run script with full access privileges Off
                                                                                                                                                                                      Siri Shortcut Visible Off
                                                                                                                                                                                      Include In Menu No
                                                                                                                                                                                      Layouts that use this script
                                                                                                                                                                                        Scripts that use this script
                                                                                                                                                                                        Script Definition
                                                                                                                                                                                        Script Steps
                                                                                                                                                                                        • Set Variable [ $email; Value:Get(ScriptParameter) ]
                                                                                                                                                                                        • If [ Length($email) = 0 ]
                                                                                                                                                                                        • Exit Script [ ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #check basic values
                                                                                                                                                                                        • Set Variable [ $EmailID; Value:IMAP EMails::EmailID ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::Subject; MBS("EmailParser.Subject"; $email) ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::Plain Text; MBS("EmailParser.plainText"; $email) ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::HTML Text; MBS("EmailParser.HTMLText"; $email) ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::SendDate; MBS("EmailParser.SentDate"; $email) ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::ReceiveDate; MBS("EmailParser.ReceiveDate"; $email) ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::Loaded; 1 ]
                                                                                                                                                                                        • #make html if missing
                                                                                                                                                                                        • If [ Length ( IMAP EMails::HTML Text ) = 0 ]
                                                                                                                                                                                        • Perform Script [ “Text to Webviewer” ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #find a header
                                                                                                                                                                                        • Set Variable [ $i; Value:0 ]
                                                                                                                                                                                        • Set Variable [ $c; Value:MBS("EmailParser.HeaderCount"; $email) ]
                                                                                                                                                                                        • If [ $c > 0 ]
                                                                                                                                                                                        • Loop [ Flush: Always ]
                                                                                                                                                                                        • 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 [ IMAP EMails::Client App; $HeaderValue ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #next
                                                                                                                                                                                        • Set Variable [ $i; Value:$i + 1 ]
                                                                                                                                                                                        • Exit Loop If [ $i = $c ]
                                                                                                                                                                                        • End Loop
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • Commit Records/Requests [ Skip data entry validation; 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 Layout [ “Address” (Address) ]
                                                                                                                                                                                        • Set Variable [ $lastError; Value:Get(LastError) ]
                                                                                                                                                                                        • If [ $lastError ≠ 0 ]
                                                                                                                                                                                        • Show Custom Dialog [ Message: "Fehler: " & $lastError; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • Set Variable [ $r; Value:MBS("FM.ExecuteFileSQL"; Get(FileName); "DELETE FROM \"Address\" WHERE EmailID=?"; 9; 13; $EmailID) ]
                                                                                                                                                                                        • Loop [ Flush: Always ]
                                                                                                                                                                                        • 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; $EmailID ]
                                                                                                                                                                                        • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                                                                                                                                                                        • #next
                                                                                                                                                                                        • Set Variable [ $i; Value:$i + 1 ]
                                                                                                                                                                                        • Exit Loop If [ $i = $c ]
                                                                                                                                                                                        • End Loop
                                                                                                                                                                                        • Go to Layout [ “IMAP EMails” (IMAP EMails) ]
                                                                                                                                                                                        • Set Variable [ $lastError; Value:Get(LastError) ]
                                                                                                                                                                                        • If [ $lastError ≠ 0 ]
                                                                                                                                                                                        • Show Custom Dialog [ Message: "Fehler: " & $lastError; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #find all attachments
                                                                                                                                                                                        • Set Variable [ $ac; Value:MBS("EmailParser.AttachmentCount"; $email) ]
                                                                                                                                                                                        • Set Variable [ $ic; Value:MBS("EmailParser.InlineCount"; $email) ]
                                                                                                                                                                                        • If [ $ac > 0 or $ic > 0 ]
                                                                                                                                                                                        • Go to Layout [ “Attachment” (Attachment) ]
                                                                                                                                                                                        • Set Variable [ $lastError; Value:Get(LastError) ]
                                                                                                                                                                                        • If [ $lastError ≠ 0 ]
                                                                                                                                                                                        • Show Custom Dialog [ Message: "Fehler: " & $lastError; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • Set Variable [ $r; Value:MBS("FM.ExecuteFileSQL"; Get(FileName); "DELETE FROM \"Attachment\" WHERE EmailID=?"; 9; 13; $EmailID) ]
                                                                                                                                                                                        • If [ $ac > 0 ]
                                                                                                                                                                                        • Set Variable [ $i; Value:0 ]
                                                                                                                                                                                        • Loop [ Flush: Always ]
                                                                                                                                                                                        • 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; $EmailID ]
                                                                                                                                                                                        • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                                                                                                                                                                        • #next
                                                                                                                                                                                        • Set Variable [ $i; Value:$i + 1 ]
                                                                                                                                                                                        • Exit Loop If [ $i = $ac ]
                                                                                                                                                                                        • End Loop
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #find all inline graphics
                                                                                                                                                                                        • If [ $ic > 0 ]
                                                                                                                                                                                        • Set Variable [ $i; Value:0 ]
                                                                                                                                                                                        • Loop [ Flush: Always ]
                                                                                                                                                                                        • Set Variable [ $Name; Value:MBS("EmailParser.inline"; $email; $i; "filename") ]
                                                                                                                                                                                        • Set Variable [ $content; Value:MBS("EmailParser.Inline"; $email; $i; "container") ]
                                                                                                                                                                                        • Set Variable [ $contentID; Value:MBS("EmailParser.Inline"; $email; $i; "contentID") ]
                                                                                                                                                                                        • Set Variable [ $contentID; Value:MBS("Text.RemovePrefix"; MBS("Text.RemovePostfix"; $contentID; ">"); "<") ]
                                                                                                                                                                                        • New Record/Request
                                                                                                                                                                                        • Set Field [ Attachment::Content; $content ]
                                                                                                                                                                                        • Set Field [ Attachment::FileName; $name ]
                                                                                                                                                                                        • Set Field [ Attachment::EmailID; $EmailID ]
                                                                                                                                                                                        • Set Field [ Attachment::contentId; $contentID ]
                                                                                                                                                                                        • Commit Records/Requests [ Skip data entry validation; No dialog ]
                                                                                                                                                                                        • #next
                                                                                                                                                                                        • Set Variable [ $i; Value:$i + 1 ]
                                                                                                                                                                                        • Exit Loop If [ $i = $ic ]
                                                                                                                                                                                        • End Loop
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • Go to Layout [ “IMAP EMails” (IMAP EMails) ]
                                                                                                                                                                                        • Set Variable [ $lastError; Value:Get(LastError) ]
                                                                                                                                                                                        • If [ $lastError ≠ 0 ]
                                                                                                                                                                                        • Show Custom Dialog [ Message: "Fehler: " & $lastError; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                        • Else If [ $lastError ≠ 0 ]
                                                                                                                                                                                        • Show Custom Dialog [ Message: "Fehler: " & $lastError; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #Emails attached in this email?
                                                                                                                                                                                        • Set Variable [ $Emails; Value:MBS("EmailParser.AttachedEmails"; $email) ]
                                                                                                                                                                                        • If [ MBS("IsError") = 0 ]
                                                                                                                                                                                        • Set Variable [ $cc; Value:ValueCount ( $Emails ) ]
                                                                                                                                                                                        • Set Variable [ $ii; Value:1 ]
                                                                                                                                                                                        • If [ $cc > 0 ]
                                                                                                                                                                                        • Loop [ Flush: Always ]
                                                                                                                                                                                        • Set Variable [ $EmailID; Value:GetValue($Emails; $ii) ]
                                                                                                                                                                                        • // Show Custom Dialog [ Title: "Got attached email"; Message: $EmailID; Default Button: “OK”, Commit: “Yes”; Button 2: “Abbrechen”, Commit: “No” ]
                                                                                                                                                                                        • #Let's add attached email
                                                                                                                                                                                        • #Now create new record
                                                                                                                                                                                        • Set Variable [ $PostBoxID; Value:IMAP Postbox::PostboxID ]
                                                                                                                                                                                        • Go to Layout [ “IMAP EMails” (IMAP EMails) ]
                                                                                                                                                                                        • New Record/Request
                                                                                                                                                                                        • Set Field [ IMAP EMails::Source; MBS("EmailParser.Source"; $EmailID) ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::PostboxID; $PostBoxID ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::Loaded; 1 ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::Date; MBS( "EmailParser.SentDate"; $email ) ]
                                                                                                                                                                                        • #check addresses
                                                                                                                                                                                        • Set Variable [ $EmailRecordID; Value:Get(RecordID) ]
                                                                                                                                                                                        • Set Variable [ $i; Value:0 ]
                                                                                                                                                                                        • Set Variable [ $c; Value:MBS("EmailParser.AddressCount"; $email) ]
                                                                                                                                                                                        • If [ $c > 0 ]
                                                                                                                                                                                        • Loop [ Flush: Always ]
                                                                                                                                                                                        • 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") ]
                                                                                                                                                                                        • If [ $type = "TO" ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::To; If(Length($name) = 0; $emailAddress; $Name) ]
                                                                                                                                                                                        • Else If [ $type = "FROM" ]
                                                                                                                                                                                        • Set Field [ IMAP EMails::From; If(Length($name) = 0; $emailAddress; $Name) ]
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #next
                                                                                                                                                                                        • Set Variable [ $i; Value:$i + 1 ]
                                                                                                                                                                                        • Exit Loop If [ $i = $c ]
                                                                                                                                                                                        • End Loop
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • Commit Records/Requests [ No dialog ]
                                                                                                                                                                                        • Perform Script [ “ParseEmail”; Parameter: $EmailID ]
                                                                                                                                                                                        • #next
                                                                                                                                                                                        • Set Variable [ $ii; Value:$ii + 1 ]
                                                                                                                                                                                        • Exit Loop If [ $ii > $cc ]
                                                                                                                                                                                        • End Loop
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • End If
                                                                                                                                                                                        • #cleanup
                                                                                                                                                                                        • Set Variable [ $r; Value:MBS("EmailParser.Free"; $email) ]
                                                                                                                                                                                        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: [ShowPreview]
                                                                                                                                                                                            Script Name ShowPreview Trigger
                                                                                                                                                                                            Run script with full access privileges Off
                                                                                                                                                                                            Siri Shortcut Visible Off
                                                                                                                                                                                            Include In Menu Yes
                                                                                                                                                                                            Layouts that use this script
                                                                                                                                                                                              Scripts that use this script
                                                                                                                                                                                                Script Definition
                                                                                                                                                                                                Script Steps
                                                                                                                                                                                                • #Loads preview trigger
                                                                                                                                                                                                • If [ GetValue(Get ( TriggerTargetPanel );2) = "PreviewTab" ]
                                                                                                                                                                                                • Perform Script [ “ShowPreview” ]
                                                                                                                                                                                                • End If
                                                                                                                                                                                                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: [ShowPreview Trigger] Next Script: [Text to Webviewer]
                                                                                                                                                                                                            Script Name ShowPreview
                                                                                                                                                                                                            Run script with full access privileges Off
                                                                                                                                                                                                            Siri Shortcut Visible Off
                                                                                                                                                                                                            Include In Menu Yes
                                                                                                                                                                                                            Layouts that use this script
                                                                                                                                                                                                              Scripts that use this script
                                                                                                                                                                                                              Script Definition
                                                                                                                                                                                                              Script Steps
                                                                                                                                                                                                              • #Loads preview of email
                                                                                                                                                                                                              • Set Variable [ $TempPath; Value:MBS( "Path.AddPathComponent"; MBS( "Folders.UserTemporary" ); "EmailPreview") ]
                                                                                                                                                                                                              • Set Variable [ $html; Value:IMAP EMails::HTML Text ]
                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS( "Files.CreateDirectory"; $TempPath) ]
                                                                                                                                                                                                              • # We write all the image files for inline graphics to folder
                                                                                                                                                                                                              • Go to Related Record [ From table: “Attachment”; Using layout: “Attachment” (Attachment) ] [ Show only related records ]
                                                                                                                                                                                                              • Set Variable [ $lasterror; Value:Get(LastError) ]
                                                                                                                                                                                                              • If [ $lasterror = 0 ]
                                                                                                                                                                                                              • Set Variable [ $recordCount; Value:Get(FoundCount) ]
                                                                                                                                                                                                              • If [ $recordCount > 0 ]
                                                                                                                                                                                                              • Go to Record/Request/Page [ First ]
                                                                                                                                                                                                              • Loop [ Flush: Always ]
                                                                                                                                                                                                              • Set Variable [ $contentID; Value:Attachment::contentId ]
                                                                                                                                                                                                              • If [ Length ( $contentID ) > 0 ]
                                                                                                                                                                                                              • Set Variable [ $filename; Value:Attachment::FileName ]
                                                                                                                                                                                                              • Set Variable [ $html; Value:Substitute ( $html ; "cid:" & $contentID ; $filename ) ]
                                                                                                                                                                                                              • Set Variable [ $path; Value:MBS( "Path.AddPathComponent"; $TempPath; $filename) ]
                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS("Container.WriteFile"; Attachment::Content; $path) ]
                                                                                                                                                                                                              • End If
                                                                                                                                                                                                              • Go to Record/Request/Page [ Next; Exit after last ]
                                                                                                                                                                                                              • End Loop
                                                                                                                                                                                                              • End If
                                                                                                                                                                                                              • End If
                                                                                                                                                                                                              • Go to Layout [ “IMAP EMails” (IMAP EMails) ]
                                                                                                                                                                                                              • #Set encoding header to UTF-8
                                                                                                                                                                                                              • Set Variable [ $html; Value:Substitute ( $html ; " content=\"text/html; charset=iso-8859-1\""; " content=\"text/html; charset=utf-8\"" ) ]
                                                                                                                                                                                                              • Set Variable [ $html; Value:Substitute ( $html ; "</head>"; "<meta charset=\"utf-8\" /></head>" ) ]
                                                                                                                                                                                                              • If [ Position ( $html ; "<html>" ; 1 ; 1 ) = 0 ]
                                                                                                                                                                                                              • #put missing header in front
                                                                                                                                                                                                              • Set Variable [ $html; Value:"<html><head><meta charset=\"utf-8\" /></head><body>" & $html & "</body></html>" ]
                                                                                                                                                                                                              • Else If [ Position ( $html ; "<head>" ; 1 ; 1 ) = 0 ]
                                                                                                                                                                                                              • #put in missing header
                                                                                                                                                                                                              • Set Variable [ $html; Value:Substitute($html; "<html>"; "<html><head><meta charset=\"utf-8\" /></head>") ]
                                                                                                                                                                                                              • End If
                                                                                                                                                                                                              • #Write HTML file
                                                                                                                                                                                                              • Set Variable [ $EmailPath; Value:MBS( "Path.AddPathComponent"; $TempPath; "mail.html") ]
                                                                                                                                                                                                              • Set Variable [ $r; Value:MBS( "Text.WriteTextFile"; $html; $EmailPath; "UTF-8" ) ]
                                                                                                                                                                                                              • #Load in webviewer
                                                                                                                                                                                                              • Set Variable [ $EmailURL; Value:MBS( "Path.FilePathToFileURL"; $EmailPath ) ]
                                                                                                                                                                                                              • Set Web Viewer [ Object Name: "web"; URL: $EmailURL ]
                                                                                                                                                                                                              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: [ShowPreview] Next Script: [Delete Email]
                                                                                                                                                                                                                    Script Name Text to Webviewer
                                                                                                                                                                                                                    Run script with full access privileges Off
                                                                                                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                                                                                                    Include In Menu No
                                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                                                                      Script Definition
                                                                                                                                                                                                                      Script Steps
                                                                                                                                                                                                                      • #convert an plain text email to html to show in preview
                                                                                                                                                                                                                      • Set Variable [ $text; Value:IMAP EMails::Plain Text ]
                                                                                                                                                                                                                      • Set Variable [ $html; Value:MBS( "Text.EncodeToHTML"; $text ) ]
                                                                                                                                                                                                                      • Set Variable [ $html; Value:MBS( "RegEx.ReplaceAll"; $html; "(http|https)://([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?"; "<a href=\"\0\" target=\"_blank\">\0</a>"; "Caseless¶greedy") ]
                                                                                                                                                                                                                      • Set Variable [ $html; Value:MBS( "Text.ReplaceNewline"; $html; 4 ) ]
                                                                                                                                                                                                                      • Set Variable [ $html; Value:"<html><body><p>" & $html & "</p></body></html>" ]
                                                                                                                                                                                                                      • Set Field [ IMAP EMails::HTML Text; $html ]
                                                                                                                                                                                                                      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: [Text to Webviewer] Next Script: [List Folders]
                                                                                                                                                                                                                              Script Name Delete Email
                                                                                                                                                                                                                              Run script with full access privileges Off
                                                                                                                                                                                                                              Siri Shortcut Visible Off
                                                                                                                                                                                                                              Include In Menu Yes
                                                                                                                                                                                                                              Layouts that use this script
                                                                                                                                                                                                                              Scripts that use this script
                                                                                                                                                                                                                                Script Definition
                                                                                                                                                                                                                                Script Steps
                                                                                                                                                                                                                                • Go to Layout [ “IMAP EMails” (IMAP EMails) ]
                                                                                                                                                                                                                                • Set Variable [ $UID; Value:IMAP EMails::UID ]
                                                                                                                                                                                                                                • If [ $UID > 0 ]
                                                                                                                                                                                                                                • # Mark email to be deleted on server
                                                                                                                                                                                                                                • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                                                                                                • Perform Script [ “Setup CURL”; Parameter: $curl ]
                                                                                                                                                                                                                                • #Let us set the FLAG for deleted
                                                                                                                                                                                                                                • Set Variable [ $r; Value:MBS("CURL.SetOptionCustomRequest"; $curl; "UID STORE " & $UID & " +FLAGS (\DELETED)") ]
                                                                                                                                                                                                                                • #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 Field [ IMAP Postbox::Log; $debug ]
                                                                                                                                                                                                                                • If [ $result = "OK" ]
                                                                                                                                                                                                                                • #Now request to delete all emails marked as deleted
                                                                                                                                                                                                                                • Set Variable [ $r; Value:MBS("CURL.SetOptionCustomRequest"; $curl; "EXPUNGE") ]
                                                                                                                                                                                                                                • #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 Field [ IMAP Postbox::Log; $debug ]
                                                                                                                                                                                                                                • End If
                                                                                                                                                                                                                                • Set Variable [ $r; Value:MBS("CURL.Cleanup"; $curl) ]
                                                                                                                                                                                                                                • Delete Record/Request [ No dialog ]
                                                                                                                                                                                                                                • End If
                                                                                                                                                                                                                                • Go to Layout [ “IMAP Postbox” (IMAP Postbox) ]
                                                                                                                                                                                                                                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: [Delete Email] Next Script: [Delete local EMails]
                                                                                                                                                                                                                                    Script Name List Folders
                                                                                                                                                                                                                                    Run script with full access privileges Off
                                                                                                                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                                                                                                                    Include In Menu Yes
                                                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                                                      Scripts that use this script
                                                                                                                                                                                                                                        Script Definition
                                                                                                                                                                                                                                        Script Steps
                                                                                                                                                                                                                                        • #You see list of folders in debug log
                                                                                                                                                                                                                                        • # query list of emails
                                                                                                                                                                                                                                        • Set Variable [ $curl; Value:MBS("CURL.New") ]
                                                                                                                                                                                                                                        • Perform Script [ “Setup CURL”; Parameter: $curl ]
                                                                                                                                                                                                                                        • # use URL with / on end to list folders
                                                                                                                                                                                                                                        • Set Variable [ $URL; Value:"imap://" & IMAP Postbox::Server URL & "/" ]
                                                                                                                                                                                                                                        • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; $URL) ]
                                                                                                                                                                                                                                        • #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 Field [ IMAP Postbox::Log; $debug ]
                                                                                                                                                                                                                                        • Set Variable [ $r; 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

                                                                                                                                                                                                                                              Previous Script: [List Folders] Next Script: [Setup CURL]
                                                                                                                                                                                                                                              Script Name Delete local EMails
                                                                                                                                                                                                                                              Run script with full access privileges Off
                                                                                                                                                                                                                                              Siri Shortcut Visible Off
                                                                                                                                                                                                                                              Include In Menu Yes
                                                                                                                                                                                                                                              Layouts that use this script
                                                                                                                                                                                                                                                Scripts that use this script
                                                                                                                                                                                                                                                  Script Definition
                                                                                                                                                                                                                                                  Script Steps
                                                                                                                                                                                                                                                  • Set Variable [ $r; Value:MBS( "FM.DeleteRecords"; Get(FileName); "IMAP EMails"; "PostboxID"; IMAP Postbox::PostboxID ) ]
                                                                                                                                                                                                                                                  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: [Delete local EMails] Next Script: [Import Email Files]
                                                                                                                                                                                                                                                          Script Name Setup CURL
                                                                                                                                                                                                                                                          Run script with full access privileges Off
                                                                                                                                                                                                                                                          Siri Shortcut Visible Off
                                                                                                                                                                                                                                                          Include In Menu Yes
                                                                                                                                                                                                                                                          Layouts that use this script
                                                                                                                                                                                                                                                            Scripts that use this script
                                                                                                                                                                                                                                                            Script Definition
                                                                                                                                                                                                                                                            Script Steps
                                                                                                                                                                                                                                                            • # Central script to setup CURL
                                                                                                                                                                                                                                                            • Set Variable [ $curl; Value:Get(ScriptParameter) ]
                                                                                                                                                                                                                                                            • #use imap:// to connect with plain text and upgrade to TLS later. Or use imaps:// if server requires SSL/TLS connection from start.
                                                                                                                                                                                                                                                            • Set Variable [ $Port; Value:"" /* empty for default. Can be 143 or 993. */ ]
                                                                                                                                                                                                                                                            • Set Variable [ $protocol; Value:If($port = 993; "imaps://"; "imap://") ]
                                                                                                                                                                                                                                                            • #Lots of customers try gmail and they need imaps here
                                                                                                                                                                                                                                                            • If [ IMAP Postbox::Server URL = "imap.gmail.com" ]
                                                                                                                                                                                                                                                            • Set Variable [ $protocol; Value:"imaps://" ]
                                                                                                                                                                                                                                                            • End If
                                                                                                                                                                                                                                                            • Set Variable [ $URL; Value:$protocol & IMAP Postbox::Server URL & "/INBOX" ]
                                                                                                                                                                                                                                                            • Set Variable [ $r; Value:MBS("CURL.SetOptionURL"; $curl; $URL) ]
                                                                                                                                                                                                                                                            • #login via username and password
                                                                                                                                                                                                                                                            • Set Variable [ $r; Value:MBS("CURL.SetOptionUserName"; $curl; IMAP Postbox::Username) ]
                                                                                                                                                                                                                                                            • Set Variable [ $r; Value:MBS("CURL.SetOptionPassword"; $curl; IMAP Postbox::Password) ]
                                                                                                                                                                                                                                                            • #or if you have a token for gmail or office365 instead of a password
                                                                                                                                                                                                                                                            • // Set Variable [ $r; Value:MBS("CURL.SetOptionXOAuth2Bearer"; $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 ]
                                                                                                                                                                                                                                                            • If [ Length ( $port ) > 0 ]
                                                                                                                                                                                                                                                            • Set Variable [ $result; Value:MBS("CURL.SetOptionPort"; $curl; $port) ]
                                                                                                                                                                                                                                                            • End If
                                                                                                                                                                                                                                                            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: [Setup CURL]
                                                                                                                                                                                                                                                                    Script Name Import Email Files
                                                                                                                                                                                                                                                                    Run script with full access privileges Off
                                                                                                                                                                                                                                                                    Siri Shortcut Visible Off
                                                                                                                                                                                                                                                                    Include In Menu Yes
                                                                                                                                                                                                                                                                    Layouts that use this script
                                                                                                                                                                                                                                                                    Scripts that use this script
                                                                                                                                                                                                                                                                      Script Definition
                                                                                                                                                                                                                                                                      Script Steps
                                                                                                                                                                                                                                                                      • #Import an eml file
                                                                                                                                                                                                                                                                      • Set Variable [ $PostBoxID; Value:IMAP Postbox::PostboxID ]
                                                                                                                                                                                                                                                                      • #Select one or more files
                                                                                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS("FileDialog.Reset") ]
                                                                                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS("FileDialog.SetAllowMulti"; 1) ]
                                                                                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS("FileDialog.SetPrompt"; "Import") ]
                                                                                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS("FileDialog.SetMessage"; "Please select eml file.") ]
                                                                                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS("FileDialog.SetFilter"; "eml"; "*.EML"; "Email files") ]
                                                                                                                                                                                                                                                                      • Set Variable [ $r; Value:MBS("FileDialog.OpenFileDialog") ]
                                                                                                                                                                                                                                                                      • If [ $r = "OK" ]
                                                                                                                                                                                                                                                                      • Set Variable [ $index; Value:0 ]
                                                                                                                                                                                                                                                                      • Set Variable [ $count; Value:MBS("FileDialog.GetPathCount") ]
                                                                                                                                                                                                                                                                      • Loop [ Flush: Always ]
                                                                                                                                                                                                                                                                      • Set Variable [ $path; Value:MBS("FileDialog.GetPath"; $index) ]
                                                                                                                                                                                                                                                                      • #got a file, but is it ours?
                                                                                                                                                                                                                                                                      • If [ Right ( $path; 4) = ".eml" ]
                                                                                                                                                                                                                                                                      • Set Variable [ $EmailRef; Value:MBS( "EmailParser.ParseFile"; $Path ) ]
                                                                                                                                                                                                                                                                      • If [ MBS("IsError") ]
                                                                                                                                                                                                                                                                      • Show Custom Dialog [ Title: "Failed to read email."; Message: $path; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]
                                                                                                                                                                                                                                                                      • Else [ ]
                                                                                                                                                                                                                                                                      • #Now create new record
                                                                                                                                                                                                                                                                      • Go to Layout [ “IMAP EMails” (IMAP EMails) ]
                                                                                                                                                                                                                                                                      • Set Variable [ $content; Value:MBS("Text.ReadTextFile"; $path) ]
                                                                                                                                                                                                                                                                      • New Record/Request
                                                                                                                                                                                                                                                                      • Set Field [ IMAP EMails::Source; $content ]
                                                                                                                                                                                                                                                                      • Set Field [ IMAP EMails::PostboxID; $PostBoxID ]
                                                                                                                                                                                                                                                                      • Set Field [ IMAP EMails::Loaded; 1 ]
                                                                                                                                                                                                                                                                      • Set Field [ IMAP EMails::Date; MBS( "EmailParser.SentDate"; $EmailRef ) ]
                                                                                                                                                                                                                                                                      • #check addresses
                                                                                                                                                                                                                                                                      • Set Variable [ $EmailRecordID; Value:Get(RecordID) ]
                                                                                                                                                                                                                                                                      • Set Variable [ $i; Value:0 ]
                                                                                                                                                                                                                                                                      • Set Variable [ $c; Value:MBS("EmailParser.AddressCount"; $emailRef) ]
                                                                                                                                                                                                                                                                      • If [ $c > 0 ]
                                                                                                                                                                                                                                                                      • Loop [ Flush: Always ]
                                                                                                                                                                                                                                                                      • Set Variable [ $Name; Value:MBS("EmailParser.Address"; $emailRef; $i; "name") ]
                                                                                                                                                                                                                                                                      • Set Variable [ $emailAddress; Value:MBS("EmailParser.Address"; $emailRef; $i; "email") ]
                                                                                                                                                                                                                                                                      • Set Variable [ $type; Value:MBS("EmailParser.Address"; $emailRef; $i; "type") ]
                                                                                                                                                                                                                                                                      • If [ $type = "TO" ]
                                                                                                                                                                                                                                                                      • Set Field [ IMAP EMails::To; If(Length($name) = 0; $emailAddress; $Name) ]
                                                                                                                                                                                                                                                                      • Else If [ $type = "FROM" ]
                                                                                                                                                                                                                                                                      • Set Field [ IMAP EMails::From; If(Length($name) = 0; $emailAddress; $Name) ]
                                                                                                                                                                                                                                                                      • End If
                                                                                                                                                                                                                                                                      • #next
                                                                                                                                                                                                                                                                      • Set Variable [ $i; Value:$i + 1 ]
                                                                                                                                                                                                                                                                      • Exit Loop If [ $i = $c ]
                                                                                                                                                                                                                                                                      • End Loop
                                                                                                                                                                                                                                                                      • End If
                                                                                                                                                                                                                                                                      • Commit Records/Requests [ No dialog ]
                                                                                                                                                                                                                                                                      • #now check email content...
                                                                                                                                                                                                                                                                      • Perform Script [ “ParseEmail”; Parameter: $EmailRef ]
                                                                                                                                                                                                                                                                      • End If
                                                                                                                                                                                                                                                                      • End If
                                                                                                                                                                                                                                                                      • Set Variable [ $index; Value:$index + 1 ]
                                                                                                                                                                                                                                                                      • Exit Loop If [ $index = $count ]
                                                                                                                                                                                                                                                                      • End Loop
                                                                                                                                                                                                                                                                      • End If
                                                                                                                                                                                                                                                                      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: IMAP Email

                                                                                                                                                                                                                                                                          Used functions: