--- loncom/interface/lonmsg.pm 2004/06/02 20:40:07 1.102 +++ loncom/interface/lonmsg.pm 2004/07/09 21:08:24 1.103 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines for messaging # -# $Id: lonmsg.pm,v 1.102 2004/06/02 20:40:07 raeburn Exp $ +# $Id: lonmsg.pm,v 1.103 2004/07/09 21:08:24 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -219,10 +219,14 @@ sub sendemail { my $msg = new Mail::Send; $msg->to($to); $msg->subject('[LON-CAPA] '.$subject); + my %oldENV=%ENV; + undef(%ENV); if (my $fh = $msg->open()) { print $fh $body; $fh->close; } + %ENV=%oldENV; + undef(%oldENV); } # ==================================================== Send notification emails