best
mario
On Mon, 14 Mar 2005, Humberto Rodriguez wrote:
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.
[mailto:[EMAIL PROTECTED]-----Original Message----- From: Humberto RodriguezwebSent: Monday, March 14, 2005 12:27 AM To: perl-unix-users@listserv.ActiveState.com Subject: [Perl-unix-users] Accessing mail from thethat is, to
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,access the emails from a webpage. The web serverand the mailfound that Iserver are in the same computer.
I read through many of the available modules andentities.could access the messages well with Mail::POP3Client but it does not handle MIME messages withI found Mail::Folder which seems to do what Iwant, but I don'tseem to be able to make it run. Since it dislikesthe systemfiles at /var/spool/mail, I am testing with someemails I movedto a folder called mail in the root directory of auser; Ichmodded both the directory and the two files init, hrfc andhumberto, as 777 to test; but still, I am not ableto create%options);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',following#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 the10.6.1.29] Can'terror message: [Sun Mar 13 21:56:52 2005] [error] [clientcall method "open" on an undefined value at/path/to/cgi-this.bin/webmail/folder.cgi line 16.
TIA for any help, or info on a better way to dohttp://listserv.ActiveState.com/mailman/mysubs
Humberto Rodriguez
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe:
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
_______________________________________________ Perl-Unix-Users mailing list Perl-Unix-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs