Handling incoming emails

Handling incoming emails#

The Allegra system can read emails from mailboxes (POP3 and IMAP) and either create new items from them or add comments to existing items.

You can connect the Allegra system to an email account centrally for the whole system. You can also assign an email account to each workspace. Towards the email server, Allegra behaves like any other ordinary email client such as Outlook, Lotus or Thunderbird.

If you like, Allegra can read emails from a mailbox and either create new items or add comments to existing items. When creating new items, the subject becomes the item title, the body of the email becomes the item description, and all attachments are attached to the item. You can control who is allowed to create items by email.

../_images/mailboxes.png

Based on markers in the subject line, Allegra can detect whether an item already exists. In that case, the email is added as a comment to the existing item. The following describes the process when an email is received:

  • A cron job starts the processing.

  • The email configuration is checked. If there are serious errors, they appear in the log and, if possible, as a reply email.

  • If only senders known in the system are permitted, messages from unknown senders are rejected.

  • The sender address is checked against the pattern of permitted email addresses in the server configuration, “Incoming emails” tab. This pattern is also used for the project-specific mailboxes, even if the system mailbox is switched off. To set the pattern, you must briefly activate incoming email, but you can deactivate it again afterwards.

  • The subject line is checked; it must not be empty.

  • A check for standard email error codes is performed. Such emails are discarded without comment.

  • The email is processed by the Groovy script EmailGuardScript.

  • The email is processed by the Groovy script EmailActivityScript.

  • If the sender address is known in Allegra as a user, the sender is set as the author. Otherwise, depending on the configuration, a new user is created and set, or the “guest” user is set as the author.

  • CC entries of the email are added as editors or readers depending on the setting of the properties

    • item.emailReceived.addCcAsEditor=true

    • item.emailReceived.addCcAsReader=true