Thanks Jeff; I tried that and I also tried just connecting with the folder type, without a folder name, which the documentation says may be done subsequently, with an "open" statement; still, the object does not connect. $folder is undefined after the "new" statement.
I really don't know what else to try; I think I'll leave it alone for a while and then come back to it; sometimes, this helps and the answer then jumps at you, making you wonder why you could not see it before. Let's hope that will be the case. Thanks again, Humberto Jeff wrote: Humberto, Perusing the documentation for Mail::Folder, it appears that you are probably wanting to call the 'new' method with the $folder_type and $folder_name args...passing the options hash is optional and doesn't look like you are needing it. <snippet from doc> new($foldertype, $folder_name [, %options]) </snippet> so try changing: $folder= new Mail::Folder('$folder_type','%options'); to (untested): $folder = new Mail::Folder($folder_type, $folder_name); HTH JD --- Humberto Rodriguez <[EMAIL PROTECTED]> wrote: > No Peter, thanks for your suggestion, but I tried it > and I > still get the same result. Haven't been able to > figure this > out. > > Thanks anyway. > > Humberto > > Try changing your 'quotes' to "double quotes" in the > open. > > > > -----Original Message----- > > From: Humberto Rodriguez > [mailto:[EMAIL PROTECTED] > > Sent: Monday, March 14, 2005 12:27 AM > > To: perl-unix-users@listserv.ActiveState.com > > Subject: [Perl-unix-users] Accessing mail from the > web > > > > > > Dear gurus: > > > > I have for some time, run a Unix server: > > Red Hat Linux Release 9 (Shrike) > > Kernel 2.4.20-6 on an i686 > > with Sendmail and Procmail V. 3.22 2001-09-10 > > and Perl v. 5.8.0 > > > > The system files for email are at /var/spool/mail > > > > I am trying to implement some sort of webmail, > that is, to > > access the emails from a webpage. The web server > and the > mail > > server are in the same computer. > > > > I read through many of the available modules and > found that I > > could access the messages well with > > Mail::POP3Client > > but it does not handle MIME messages with > entities. > > I found Mail::Folder which seems to do what I > want, but I > don't > > seem to be able to make it run. Since it dislikes > the system > > files at /var/spool/mail, I am testing with some > emails I > moved > > to a folder called mail in the root directory of a > user; I > > chmodded both the directory and the two files in > it, hrfc and > > humberto, as 777 to test; but still, I am not able > to create > > the object. > > > > I will be grateful for any hints. > > > > Here is the code snippet that does not work: > > > > #!/usr/bin/perl -w > > # folder.cgi > > > > use strict; > > use lib '/path/to/cgi-bin/webmail/modules'; > > use Mail::Folder; > > > > print "Content-type: text/html\n\n"; > > my ($folder_type, $folder_name, $folder, $file, > %options); > > $folder_type = 'Mbox'; > > $folder_name = '/path/to/mail'; > > $file="$folder_name/hrfc"; > > $options{DefaultFolderType}=1; > > $folder= new Mail::Folder('$folder_type', > '%options'); > > #print "\$folder is $folder<br>"; > > $folder->open('$folder_name'); > > my $num=$folder->qty; > > print "there are $num messages<br>"; > > > > Since the object is not being created, I get the > following > > error message: > > [Sun Mar 13 21:56:52 2005] [error] [client > 10.6.1.29] Can't > > call method "open" on an undefined value at > /path/to/cgi- > > bin/webmail/folder.cgi line 16. > > > > TIA for any help, or info on a better way to do > this. > > > > Humberto Rodriguez > > > > _______________________________________________ > > Perl-Unix-Users mailing list > > Perl-Unix-Users@listserv.ActiveState.com > > To unsubscribe: > http://listserv.ActiveState.com/mailman/mysubs > > > > > > > > > __________________________________________________________ > > This message was scanned by ATX > > 10:43:05 PM ET - 3/13/2005 > > > _______________________________________________ > Perl-Unix-Users mailing list > Perl-Unix-Users@listserv.ActiveState.com > To unsubscribe: > http://listserv.ActiveState.com/mailman/mysubs > > _______________________________________________ > Perl-Unix-Users mailing list > Perl-Unix-Users@listserv.ActiveState.com > To unsubscribe: > http://listserv.ActiveState.com/mailman/mysubs > __________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/ _______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs