Version 17, last updated by Titas Norkunas at August 22, 2011 05:01 UTC
Setup inbound email
Setting up Inbound Email
Breakout has the capability to accept inbound emails which are later processed by the tools. For now only the ticket tool and the message tool accepts emails (to create tickets, edit tickets, and insert comments into tickets, etc). This page explains how to configure this capability.
Inbound emails go to an IMAP server. We run a script called "email2flows" that polls the IMAP server, and passes received emails to the correct tool.
Configure the system to receive Inbound Emails
- Configure event processing.
- Create an email account at an email provider; this account will be used as the destination for inbound emails. Make sure that IMAP is enabled for this account and that you can receive all the emails for that domain (or subdomain). The login name of the mail need be the same name of space you are going to use in test. E.G.: You will use a space called "my_space" then you will need a mail like my_space
- Change (or add if missing) the values of parameters in config/settings_local.yml to correspond to your email account:
- imap_host - hostname of your email provider's IMAP service (eg. imap.gmail.com)
- imap_port - port of your email provider's IMAP service (eg. 993)
- imap_username - username of your email account
- imap_password - password of your email account
- Map incoming emails to one of your tools. The inbound email processor parses the To header of inbound emails to get the destination domain. It uses this domain to map the email to a single Assembla tool. This implies that you need an IMAP account that can handle many domains or subdomains. Or that you can only test inbound emails for one Assembla tool at a time. Change (or add if missing)alert_hosts: in config/settings_local.yml to map each tool to the proper domain. For example, this configuration will direct all inbound emails from gmail.com domain to the Ticket tool:
alert_hosts: tool_<%= FlowsTool::ID %>: nil tool_<%= TicketTool::ID %>: gmail.com
- Restart the breakout application
- Run breakout's IMAP poller.
ruby script/email2flows
Note that it is possible to apply this same technique and accept inbound emails for any custom tool that you may develop. However, you may not have duplicate host names configured simultaneously in the :alert_hosts configuration parameter. Check this wiki for more information
Configure a tool to receive email
If you want to extend a new tool to process inbound emails, follow this instructions: