• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Can someone give me some sample code on how to use the Net::IMAP module in Perl? (very simple task here)

Noriaki

Lifer
Can someone give me some sample code on how to use the Net::IMAP module in Perl?


I know I can just go perldoc IMAP.pm and it gives me pages of "info".
But I am having trouble digesting it all...

All I want is to log in with a user id call it "user1" with a password "password1" and create a folder in that user's mail account. Call it "folder1".

So...I've got.

-----------------------------------------------------------------------

#!/usr/local/bin/perl
use lib qw(lib);
use Net::IMAP;

Net::IMAP::authenticate("user1","password1");

Net::IMAP::create("folder1");

Net::IMAP::logout();

-----------------------------------------------------------------------

It complains about the create("folder1"); line...

Anyone know how to fix this code so it works?
 
Back
Top