...
The IMAP transport handler generates stream elements of type Tuple with a fixed output schema:
| Index | Attribute name | Data type | Description |
|---|
| 0 | From | String | The senders email address |
| 1 | To | String List | The |
receivers address| addresses |
| 2 | CC | String List | The list of copy receiver email addresses |
| 3 | BCC | String List | The list of blind copy reveiver email addresses |
| 4 | ReplyTo | String | The reply to email address |
| 5 | Subject | String | The subject line of the email |
| 6 | SendDate | Date | The data when the email was sent |
| 7 | FlagDeleted | Boolean | See https://docs.oracle.com/javaee/6/api/javax/mail/Flags.Flag.html |
| 8 | FlagAnswered | Boolean |
| 9 | FlagDraft | Boolean |
| 10 | FlagFlagged | Boolean |
| 11 | FlagRecent | Boolean |
| 12 | FlagSeen | Boolean |
| 13 | FlagUser | Boolean |
| 14 | Content | Depending on the value of option mimetypehandler: String oder OptionMap | The content of the email. Depending of the emails' MIME type, it can consist of multiple body parts and/or attached files. |
Example
PQL
| Code Block |
|---|
| theme | Eclipse |
|---|
| title | IMAP Transport Handler |
|---|
| linenumbers | true |
|---|
|
output = ACCESS({source='ImapSource',
wrapper='GenericPull',
transport='IMAP',
protocol='None',
dataHandler='Tuple',
options=[
['host','imap.example.com'],
['folder','INBOX'],
['keep','true'],
['markasread','false'],
['unreadonly','false'],
['readcontent', 'true'],
['username','Alice'],
['mimetypehandler', 'objectmap'],
['password','***']]
})
|