map { $mail->{$_} = $self->{$_} }
qw(cc bcc subject message version format charset);
- $mail->{to} = qq|$self->{email}|;
+ $mail->{to} = $self->{EMAIL_RECIPIENT} ? $self->{EMAIL_RECIPIENT} : $self->{email};
$mail->{from} = qq|"$myconfig->{name}" <$myconfig->{email}>|;
$mail->{fileid} = "$fileid.";
$myconfig->{signature} =~ s/\\r\\n/\\n/g;
$form->{IN} =~ s/html$/tex/;
}
+ # Save $form->{email} because it will be overwritten.
+ $form->{EMAIL_RECIPIENT} = $form->{email};
+
$i = 0;
while (@{ $form->{AG} }) {