diff --git a/lib/WebGUI/MailCommand.pm b/lib/WebGUI/MailCommand.pm index e81f90f..a37aca1 100644 --- a/lib/WebGUI/MailCommand.pm +++ b/lib/WebGUI/MailCommand.pm @@ -24,13 +24,14 @@ sub processCommand { my $session = shift; my $command = shift; my $parameter = shift; + my $sender = shift; my $commandClass = resolveCommandClass( $command ) || return; my $commandObject = WebGUI::Pluggable::instanciate( $commandClass, 'new', [ $session ] ); - return $commandObject->process( $parameter ); + return $commandObject->process( $parameter, $sender ); } sub session { @@ -42,7 +43,9 @@ sub resolveCommandClass { # TODO: Do not hard code. my %commands = ( - bounce => 'WebGUI::MailCommand::Bounce', + unsubscribe => 'WebGUI::MailCommand::Unsubscribe', + subscribe => 'WebGUI::MailCommand::Subscribe', + bounce => 'WebGUI::MailCommand::Bounce', ); return $commands{ $command } if exists $commands{ $command };