Beim Verschicken von Emails auch die Variable $form->{EMAIL_RECIPIENT} als Empfaenger...
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 18 Apr 2007 12:53:12 +0000 (12:53 +0000)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 18 Apr 2007 12:53:12 +0000 (12:53 +0000)
SL/Form.pm
bin/mozilla/rp.pl

index 928d75f..4f4a48d 100644 (file)
@@ -796,7 +796,7 @@ sub parse_template {
 
       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;
index 848ec62..8156df0 100644 (file)
@@ -2018,6 +2018,9 @@ sub print_form {
     $form->{IN} =~ s/html$/tex/;
   }
 
+  # Save $form->{email} because it will be overwritten.
+  $form->{EMAIL_RECIPIENT} = $form->{email};
+
   $i = 0;
   while (@{ $form->{AG} }) {