use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{template} = sub {$this->replaceOutput([]);$this->out("Subject: A new member obtained a role to approve\n\nA member has just obtained a new role that needs approval:\n\nRole:        $C->{UserRole}{role_title}\nUser name:   $C->{UserRole}{user}{name}\nUser e-mail: $C->{UserRole}{user}{email}\n");if ( $C->{UserRole}{sale_id} ) {$this->out("Sale ID:     $C->{UserRole}{sale_id}\n");}$this->out("\nYou can approve/reject here:\n$C->{SYS}{URI}/master/users/approve.html\n");return join("",@{ $this->restoreOutput });};$this->out(&{$C->{template}}."\n");}