Skip to content

Commit

Permalink
Allow controlling the default precedence of outgoing mail
Browse files Browse the repository at this point in the history
  • Loading branch information
sartak committed Jan 23, 2010
1 parent b89e52f commit 7d4a3ea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions etc/RT_Config.pm.in
Expand Up @@ -422,6 +422,22 @@ Set($OverrideOutgoingMailFrom, {

=back

=item C<$DefaultMailPrecedence>

C<$DefaultMailPrecedence> is used to control the default
Precedence level of outgoing mail where none is specified.
By default it is C<bulk>, but if you only send mail to
your staff, you may wish to change it.

Note that you can set the precedence of individual templates
by including an explicit Precedence header.

=cut

Set($DefaultMailPrecedence, 'bulk');

=back

=head1 Sendmail Configuration

These options only take effect if C<$MailCommand> is 'sendmail' or
Expand Down
2 changes: 1 addition & 1 deletion lib/RT/Action/SendEmail.pm
Expand Up @@ -607,7 +607,7 @@ sub SetRTSpecialHeaders {
}
}

$self->SetHeader( 'Precedence', "bulk" )
$self->SetHeader( 'Precedence', RT->Config->Get('DefaultMailPrecedence') )
unless ( $self->TemplateObj->MIMEObj->head->get("Precedence") );

$self->SetHeader( 'X-RT-Loop-Prevention', RT->Config->Get('rtname') );
Expand Down

2 comments on commit 7d4a3ea

@netsandbox
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't setting the Precedence header moved from RT::Action::SendEmail::SetRTSpecialHeaders to RT::Interface::Email::SendEmail? I noticed that, for example sbin/rt-email-dashboards, call RT::Interface::Email::SendEmail, so the dashboard mail won't have an Precedence header.

@bestpractical
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cloos - this isn't a great place to be suggesting refactorings. rt-devel@lists.bestpractical.com or rt-bugs@bestpractical.com are both reasonable, though,.

Please sign in to comment.