use strict;return sub{my $this = shift;my $C = $this->{C};$this->out("");$C->{template} = sub {$this->replaceOutput([]);$this->out("Subject: An affiliate program has been approved\n\n$C->{User}{name},\n\nAn affiliate program you became a participant of has just been approved by admin:\n\nAffiliate program: $C->{UserAffprog}{affprog_title}\n\nYou can login here:\n$C->{SYS}{URI}\n");return join("",@{ $this->restoreOutput });};$this->out(&{$C->{template}}."\n");}