Skip to main content

Mail Service

The mail active variable service reads emails from a mailbox over IMAP or POP3, and reads their attachments with the file service that matches each attachment's type, for example CSV or XLS. Zip and gzip attachments are unpacked. The result is a list of the files read.

Using the service​

The id is the mail server host:

files = ${mail:"imap.example.com","user=prices@northgate-energy.com,password=" + pwd + ",sender=settlements@example-broker.com,subject=Daily settlement prices"}

Options​

OptionDescriptionDefault
userThe mailbox user
passwordThe mailbox password. Keep it in a secret
agentimap or pop3imap
portThe server port993 for IMAP, 995 for POP3
folderThe folder to readINBOX
seentrue reads emails that have been read, false reads unread emailsfalse
senderOnly read emails from these senders
subjectOnly read emails with this subject
fromDateTimeOnly read emails received on or after this date, as dd-MM-yyyy
toDateTimeOnly read emails received on or before this date, as dd-MM-yyyy
filter_filesOnly read the attachments with these file names, separated by ;