Microsoft Partner

Sun Associate Partner

Intel Software Partner

1C:Franchisee
Irina Lager
Creating tasks in the Redmine by Receiving emails from POP3 server
July 24, 2010 08:05:10

Redmine allows users to create issues based on received e-mail (Receiving emails) messages. Yes, it is really great when the user's complaint automatically gets into the Redmine as an issue - bug, ticket or something else. However, as it often happens (especially with open source projects) the way to enable this feature is a little bit tricky. So here I'm going to share my experience of turning on this feature in Redmine.

1. Check whether these files exist in the location where the Redmine is installed: redmine\lib\redmine\pop3.rb and redmine\lib\tasks\email.rake

At first, check whether these files exist in the location where the Redmine is installed: redmine\lib\redmine\pop3.rb and redmine\lib\tasks\email.rake
But first of all, check the Redmine version. The easy way to do it is to view file CHANGELOG (redmine\doc\CHANGELOG).
The first string here is version info. If it is 0.8.X or lower, there is no POP3 support.

Generally speaking, two files (redmine\lib\redmine\pop3.rb and redmine\lib\tasks\email.rake) are responsible for receiving emails from
POP3 servers.

Check pop3.rb in the folder redminelib of Redmine. If there is no such file, you should download it from the repository:
http://redmine.rubyforge.org/svn/trunk/lib/redmine/pop3.rb

After that, open email.rake file in the redminelib/asks folder. Try to fine in this file references to POP3. If there is none of them (and
respectively no POP3 support), replace email.rake file with the newest version from the Redmine repository
(http://redmine.rubyforge.org/svn/trunk/lib/tasks/email.rake).

Restart Redmine. If you are using Bitnami Redmine stack, there are special commands in the Start menu for starting/stopping Redmine.

2. Create Redmine User for issues creation

This user should have the same e-mail address, from which the letters to Redmine will be sending. For instance, somebody sends
email from This e-mail address is being protected from spambots. You need JavaScript enabled to view it . It means that the user with this email should be existing in the Redmine (and, consequently,
should have all necessary rights for the issues creation).

3. Enable mail receiving API

Log into the Redmine as an administrator, go to Application settings -> Incoming emails, check Enable WS for incoming emails and
enter or generate a secret key (without this key the e-mail receiving will also be working).

Redmine settings
Fig. 1. – Enable mail receiving API

4. Create a script or BAT file for receiving e-mails into Redmine

Take a look at the example of the script below. It is assuming that POP3 parameters are:
Host = pop3.myhost.com,
Username = IncomeRedmineEmail,
Password = IncomeRedmineEmailPassword, and
there is a project in the Redmine with name "ProjectName", the tracker "Feedback" exists and available for the "ProjectName" project;
and [Redmine_Path] is a Redmine directory path.

REM Setting path

SET Redmine_Path = c:Program filesBitNami Redmine Srackpps edmine

REM Setting email

SET Host = pop3. myhost.com
SET Username = IncomeRedmineEmail
SET Password = IncomeRedmineEmailPassword
SET Project = ProjectName
SET Tracker = Feedback

REM Getting emails from server
Rake –f “%REDMINE_PATH%rakefile” redmine:email:receive_pop3 RAILS_ENV=”producrion” host=%Host% username=%Username% password=%Password% project=%Project% tracker=%Tracker%

For detailed information about rake task format (redmine:email:receive_pop3) please see Receiving emails.

5. Create a schedule for running script for receiving e-mail.The simplest way to do this is use the Windows is Task Scheduler

After those five steps, e-mail messages from This e-mail address is being protected from spambots. You need JavaScript enabled to view it address (you should remember, this is an address of our
Redmine user) to This e-mail address is being protected from spambots. You need JavaScript enabled to view it   (an address of Redmine inbox) will be added to the Redmine project ProjectName
as Feedbacks in by the schedule.

Tags: Redmine | POP3 | email

December 31, 2011 15:20:48
euroblaze

Greetings,

This howto is from over a year ago. Can someone confirm that the Email-API over POP works in the current version as well?

Thank you
Ashant


Name: 
 
Text: 
Code: 
Enter text shown at the left:




Contact us
Let us know about your potential development needs even if you don't have a formal RFP yet.

Company News