[Rt-commit] rt branch, 4.0/multiple-reply-to, repushed
? sunnavy
sunnavy at bestpractical.com
Thu Oct 2 13:55:17 EDT 2014
The branch 4.0/multiple-reply-to was deleted and repushed:
was d00b0982009e832f1e9701f991dd9153eae8fa63
now b079f6062fa0f2ad588ffa4f84a976583d0b0532
1: 2770222 = 1: be240a6 extract WhichRightShouldBeChecked function
2: 22972d4 < -: ------- change how address parsers work
-: ------- > 2: 1502697 new address parser to return a list of addresses
3: 8fb18df ! 3: 3a876de take into account multiple sender's addresses
@@ -1,4 +1,4 @@
-Author: Ruslan Zakirov <ruz at bestpractical.com>
+Author: sunnavy <sunnavy at bestpractical.com>
take into account multiple sender's addresses
@@ -9,14 +9,27 @@
--- a/lib/RT/Interface/Email/Auth/MailFrom.pm
+++ b/lib/RT/Interface/Email/Auth/MailFrom.pm
@@
+ use strict;
+ use warnings;
+
+-use RT::Interface::Email qw(ParseSenderAddressFromHead CreateUser);
++use RT::Interface::Email qw(ParseSenderAddressesFromHead CreateUser);
+
+ # This is what the ordinary, non-enhanced gateway does at the moment.
+
+@@
# We don't need to do any external lookups
-- my ( $Address, $Name ) = ParseSenderAddressFromHead( $args{'Message'}->head );
+- my ( $Address, $Name, @errors ) = ParseSenderAddressFromHead( $args{'Message'}->head );
+- $RT::Logger->warning("Failed to parse ".join(', ', @errors))
+- if @errors;
+-
- unless ( $Address ) {
-+ my $addresses = ParseSenderAddressFromHead( $args{'Message'}->head );
++ my ($addresses, @errors) = ParseSenderAddressesFromHead( $args{'Message'}->head );
++ $RT::Logger->warning("Failed to parse ".join(', ', @errors)) if @errors;
+ unless ( $addresses ) {
- $RT::Logger->error("Couldn't find sender's address");
+ $RT::Logger->error("Couldn't parse or find sender's address");
return ( $args{'CurrentUser'}, -1 );
}
4: a645597 < -: ------- use sender in ParseCcAddressesFromHead
5: d00b098 ! 4: b079f60 simple test for multiple reply-to addresses
@@ -11,8 +11,6 @@
+use warnings;
+
+use RT::Test tests => 7;
-+
-+RT->Config->Set( ParseNewMessageForTicketCcs => 1 );
+
+diag "grant everybody with CreateTicket right";
+{
@@ -53,11 +51,10 @@
+Blah!
+Foob!
+EOF
-+ ($status, my $tid) = RT::Test->send_via_mailgate($text);
++ ($status, $tid) = RT::Test->send_via_mailgate($text);
+ is ($status >> 8, 0, "The mail gateway exited normally");
+ is ($tid, $id, "ticket updated");
+}
+
+
+1;
-\ No newline at end of file
More information about the rt-commit
mailing list