Setting up mail fetching

Getting mail by REST api (recommended)

1. Enable email web service

Enable WS for incoming emails and generate API key (Administration -> Settings -> Incoming email - API key)

2. Set incoming mail server params

/projects/[your_helpdesk_project_identifier]/settings/contacts_helpdesk

Mail server settings

3. Fetch email

Fetching email through HTTP GET request

$ wget -O - http://127.0.0.1/helpdesk_mailer/get_mail?key=******************


Getting mail by rake task (higher CPU load)

1. Set incoming mail server params

/projects/[your_helpdesk_project_identifier]/settings/contacts_helpdesk

Mail server settings

2. Fetch email

Fetching email through ruby rake task

$ bundle exec rake redmine:email:helpdesk:receive RAILS_ENV=production


Add to cron in Linux

1. Create/edit the crontab file

Create a new crontab file, or edit an existing file

$ sudo crontab -e

2. Add command lines to the crontab file

Add the following line for every 5 minutes updates:

*/5 * * * * wget -O - http://127.0.0.1/helpdesk_mailer/get_mail?key=************

Important: If you have a port specified, please do not forget to also set it into the command, example could be checked below:

*/5 * * * * wget -O - http://127.0.0.1:3000/helpdesk_mailer/get_mail?key=*********** 

Note: if you want to use one e-mail for all projects, you can use the Allow_override feature. It should be used only with bundle exec command and allow to change project, status, and assignee.

Video guide

Was this article helpful? Yes  No
539 from 590 found this helpful