Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Re: You have [n] messages!

Quote Reply
Re: You have [n] messages! In reply to
Yep - here's a little PERL script that I use. I call this through a SSI call. Make sure the path to your Webmail.pm is correct...

Code:
#!/usr/local/bin/perl

#require "/cgi-bin/webmail/admin/Webmail.pm";

use strict;
use lib '.';
use Path_Config;
use Webmail;
use Webmail::Authenticate;
use CGI::Carp qw/fatalsToBrowser/;

my $information = '';
my $summary = '';
my $key = '';
my $value = '';
my $new = 0;

&Webmail::initialize();
my ($in, $user, $dbh) = &Webmail::init();

if ($user->{userid} && !($user->{is_active} eq 'No')) {

$summary =( &Webmail::load_summary());
while ( ($key, $value) = each %{$summary}){
if ($key eq 'new'){
$new = $value;
}
}
}

if ($new > 0){
$information = "You have $new new emails";
}
print "Content-type: text/html\n\n";
print "$information";
Safe swoops
Sangiro
http://www.dropzone.com/
Subject Author Views Date
Thread You have [n] messages! seaghan 2744 Jan 22, 2001, 7:47 AM
Thread Re: You have [n] messages!
sangiro 2669 Jan 22, 2001, 12:02 PM
Post Re: You have [n] messages!
seaghan 2648 Jan 22, 2001, 1:08 PM