Commit 27e32c89 authored by Thomas Sibley's avatar Thomas Sibley
Browse files

Merge remote-tracking branch 'github/pr/2'

parents 2865df92 ea04c376
......@@ -52,5 +52,10 @@ There is an optional configuration option CommandByMailGroup
Set($CommandByMailGroup, group_id);
You can find the id by browsing to Configuration -> Groups
You can get it to look for commands in headers as well by setting
CommandByMailHeader like:
Set($CommandByMailHeader, "X-RT-Command");
Enjoy.
......@@ -10,8 +10,8 @@ This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
DESCRIPTION
This extension parse content of incoming messages for list commands.
Format of commands is:
This extension parses the body and headers of incoming messages
for list commands. Format of commands is:
Command: value
Command: value
......
......@@ -18,8 +18,8 @@ RT::Interface::Email::Filter::TakeAction - Change metadata of ticket via email
=head1 DESCRIPTION
This extension parse content of incomming messages for list commands. Format
of commands is:
This extension parses the body and headers of incoming messages for
list commands. Format of commands is:
Command: value
Command: value
......@@ -196,6 +196,10 @@ sub GetCurrentUser {
$RT::Logger->debug("Running CommandByMail as ".$args{'CurrentUser'}->UserObj->Name);
my $headername = $new_config
? RT->Config->Get('CommandByMailHeader')
: $RT::CommandByMailHeader;
# find the content
my @content;
my @parts = $args{'Message'}->parts_DFS;
......@@ -209,6 +213,10 @@ sub GetCurrentUser {
}
}
if (defined $headername) {
unshift @content, $args{'Message'}->head->get_all($headername);
}
my @items;
my $found_pseudoheaders = 0;
foreach my $line (@content) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment