Try eliminating the single quotes in both the $folder = new Mail::Folder statement, and in the $folder->open statement. Just use the variable names (or substitute double quotes in both statements). I think you're probably running into a problem in the "new" statement.
Chad Uretsky Lead Network and Security Engineer NetIQ Corporation [EMAIL PROTECTED] Direct: 713-418-5200 www.netiq.com -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of mario sanchez Sent: Monday, March 14, 2005 2:50 PM To: Humberto Rodriguez Cc: perl-unix-users@listserv.ActiveState.com Subject: Re: [Perl-unix-users] Accessing mail from the web peter, double quotes/single quote usage is variable - incredibly enough. in some cases i use a variable in single other times double around a variable. this practice came about from not being able to be consistent without getting an error. why, dont know. hope this helps mario On Mon, 14 Mar 2005, Humberto Rodriguez 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 > _______________________________________________ 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