]> mj.ucw.cz Git - pciids.git/blobdiff - PciIds/Email.pm
Tooltips with name in admin interface
[pciids.git] / PciIds / Email.pm
index 55d224cc2ba0a2625add49695d4f6489aa0e8efb..69daedba052ba8371fdae98eced4e2091689fb3a 100644 (file)
@@ -1,3 +1,21 @@
+#      PciIds web database
+#      Copyright (C) 2008 Michal Vaner (vorner@ucw.cz)
+#
+#      This program is free software; you can redistribute it and/or modify
+#      it under the terms of the GNU General Public License as published by
+#      he Free Software Foundation; either version 2 of the License, or
+#      (at your option) any later version.
+#
+#      This program is distributed in the hope that it will be useful,
+#      but WITHOUT ANY WARRANTY; without even the implied warranty of
+#      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#
+#      GNU General Public License for more details.
+#
+#      You should have received a copy of the GNU General Public License
+#      along with this program; if not, write to the Free Software
+#      Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
 package PciIds::Email;
 use strict;
 use warnings;
@@ -17,7 +35,8 @@ sub sendMail( $$$ ) {
        ( $error, $to ) = emailCheck( $to, undef );
        die "Invalid email in database $to\n" if defined $error;
        $body =~ s/^\.$/../gm;
-       open SENDMAIL, "|$sendmail -f$from $to" or die 'Can not send mail';
+       $ENV{'PATH'} = '/usr/sbin';
+       open SENDMAIL, "|$sendmail -f'$from' '$to'" or die 'Can not send mail';
        print SENDMAIL "From: $from\n".
                "To: $to\n".
                "Subject: $subject\n".