Project

General

Profile

Actions

Patch #1110

closed

Allow email to create issue or add comment

Added by Carl Nygard over 16 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email receiving
Target version:
Start date:
2008-04-25
Due date:
% Done:

100%

Estimated time:

Description

Summary

This is a patch for #1083 that implements an email conduit for accepting issue creation or comments via email. It's implemented as a standalone script which can be placed in your sendmail aliases configuration to receive email messages from an alias.

Configuration

The user is responsible for the email alias configuration. There is some flexibility in configuration. The script gathers the following parameters in order to create a new bug:

  • issue
  • project
  • subject
  • description
  • status
  • tracker
  • priority
  • category
  • author

These parameter can either come from the command line parameters given to the bugmail.rb script, or from the contents of the email message. If the parameter is specified in the email, it takes the form 'Param: value of param' where the parameter name is capitalized, and the value is whatever is left on the line. The exception is 'Description:' which takes whatever text is left to the end of the email. MIME attachments are not supported (yet... any takers?)

There is an option in the script to allow override of command line parameters by email information. This provides some measure of control over the bug creation process. For example:

Use special tracker for bugmail

If you want to use a special tracker, configure the tracker in your redmine project. Add the '--tracker TrackerName' parameter to the script in your /etc/aliases file, and don't use '--allow-overrides' This will force the tracker parameter to whatever you specify, regardless of the contents of the email.

Specifying project parameter

There are three options for specifying the project. One is to use the '--use-email-header' option, which grabs the project identifier from the 'To:' field of the email by decoding the address .

Another option is to use the '--project projectid' option and don't use '--allow-overrides'.

A third option might be to use one alias, (e.g. ) and require the 'Project:' tag to be present in the email.

Specifying the author

There are two ways of specifying the author. Either via the 'Author:' tag in the email body, or by matching the 'From:' field in the email headers with the email address of a particular user (if --use-email-header option is active).

Adding Comments

In order to add comments, the only real information required is the 'Issue:' id and the 'Description:' text, which will be used as the comment. Again, MIME attachments are not supported (yet...)

Script Usage

Usage: [--help] [--debug] [--allow-override] [--use-email-header] [--file <filename> ] [--<param> <value> ...]
 --help  show this help
 --debug show extra debug information
 --allow-override   allow message contents to override cmd line args
 --use-email-header search in email header for user, subject and project
 --file      get input from a file instead of STDIN
 --<param>   set a parameter's value.  Parameter is one of:
             issue, project, subject, desc, status, tracker, priority
             category, author

Example email

Received: by 10.114.159.7 with HTTP; Wed, 23 Apr 2008 19:40:37 -0700 (PDT)
Message-ID: <5faca86f0804231940r7b170d3cp7b22cdb0b43586a7@mail.gmail.com>
Date: Wed, 23 Apr 2008 22:40:37 -0400
From: "Carl Nygard" <cjnygard@gmail.com>
To: "blech" <redmine@redmine.org>
Subject: This is an issue created via email

Category: Ticket
Priority: Normal
Tracker: Feature
Description: This is a multiline
description about
the problem

h2. with wiki *formatting*

Files

bugmail.rb (6.29 KB) bugmail.rb Carl Nygard, 2008-04-25 20:31
Picture_1.png (65.7 KB) Picture_1.png UI mock for plugin configuration screen Randy Harmon, 2008-06-22 08:51
Redmine_Email_Reciever_Config.graffle (6.4 KB) Redmine_Email_Reciever_Config.graffle OmniGraffle version of the UI mock Randy Harmon, 2008-06-22 08:51

Related issues

Related to Redmine - Feature #1083: Accept new tickets via emailClosed2008-04-21

Actions
Related to Redmine - Feature #444: submit issue via emailClosed

Actions
Related to Redmine - Feature #1388: Email integration: track email answersClosed2008-06-05

Actions
Related to Redmine - Patch #1669: Add Status field to the Mail HandlerClosedEric Davis2008-07-21

Actions
Related to Redmine - Patch #13826: application.js: randomKey function optimizationClosed

Actions
Actions

Also available in: Atom PDF