--- cgi-bin/send.pl 2000/02/22 13:28:20 1.1.1.1 +++ cgi-bin/send.pl 2000/04/19 09:07:13 1.3 @@ -1,6 +1,6 @@ #!/usr/local/bin/perl -BEGIN { $APP_PATH="foo/bar"; } +BEGIN { $APP_PATH="/home/httpd/html/webmail/cgi-bin/"; } # @ ---------------------------------------------------------------------------------------------------------- # @ This code is (c) 1999 Alexandre Aufrere and NikoSoft. @@ -211,8 +211,8 @@ $date=localtime(); -my ($fromaddr) = $from; -my ($replyaddr) = $reply; +my ($fromaddr) = chomp($from); +my ($replyaddr) = chomp($reply); $to =~ s/[ \t]+/, /g; # pack spaces and add comma $cc =~ s/[ \t]+/, /g; # pack spaces and add comma @@ -250,13 +250,15 @@ print S "mail from: <$fromaddr>\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } -foreach (split(/, /, $to)) { -print S "rcpt to: <$_>\r\n"; -$_ = ; if (/^[45]/) { close S; return -6; } +foreach (split(/, */, $to)) { + chomp; + print S "rcpt to: <$_>\r\n"; + $_ = ; if (/^[45]/) { close S; return -6; } } -foreach (split(/, /, $cc)) { -print S "rcpt to: <$_>\r\n"; -$_ = ; if (/^[45]/) { close S; return -6; } +foreach (split(/, */, $cc)) { + chomp; + print S "rcpt to: <$_>\r\n"; + $_ = ; if (/^[45]/) { close S; return -6; } } print S "data\r\n"; $_ = ; if (/^[45]/) { close S; return -5; } @@ -279,4 +281,4 @@ close S; return 1; -} \ No newline at end of file +}