#!/usr/bin/perl # W3Mail - A webbased application to recieve POP3 mail and send e-mail via SMTP. # Copyright (C) 2000 Spencer Miles # # Changes, new features by Juerg Raess # # 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 the 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. use CGI qw/:standard/; use CGI::Carp qw(fatalsToBrowser); use CGI::Cookie; $cgi = new CGI; require 'w3mail.conf'; require 'w3vars.cgi'; &sessionid; $cookies = $cgi->param('cookies'); $userCookie = $cgi->param('user'); $serverCookie = $cgi->param('server'); if( $cookies eq "off") { $nameCookie = new CGI::Cookie(-name=>'name', -value=>$userCookie, -path=>$cgidir -expires=>'now'); $serverCookie = new CGI::Cookie(-name=>'server', -value=>$serverCookie, -path=>$cgidir -expires=>'now'); print header(-cookie=>[$nameCookie,$serverCookie], -type=>"text/html"); } else { print CGI::header(-type => "text/html"); %cookies = fetch CGI::Cookie; $name = $cookies{'name'}=>value; $server = $cookies{'server'}=>value; if( $name && $server) { $loginName = $name->value; $serverName = $server->value; } } &printHeader(login); my $divreply = @mailserver_replyto[0]; print qq~
W3Mail Login
Mail Server:
Username: ~; if( $loginName && $serverName ) { print qq~ $loginName~; } else { print qq~ ~; } print qq~
Password:
" } else { print qq~ Sign in as a different user~; } print qq~
You have to enable javascript in
your browsers preferences while using
W3Mail!
  ~; if( !$loginName && !$serverName ) { print "Remember my id on this computer
~; &printTail;