1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Retrieve mail using perl plz help me

Discussion in 'Perl' started by rahul_mawana, Nov 7, 2009.

  1. rahul_mawana

    rahul_mawana New Member

    Hello frnds,
    I am trying to makd a perl propram by that i can retrieve my email from a server that requires SSL
    authentication. I used
    Net::pOP3 and I tried all the
    different types of logging in such as auth(..), login(..),
    which are sub routines defined in
    But not working plz tell me any method or perl module by that i can retrive mail.
  2. murugaperumal

    murugaperumal New Member

    Dear Friend,

    You can use the following modules


    It will help your requirement.
  3. ungalnanban

    ungalnanban New Member

    Refer the following link

  4. murugaperumal

    murugaperumal New Member

    You can use the following code

     use warnings;
    use strict;
    use Mail::POP3Client;
    use lib "/home/murugaperumal/.perl_m/share/perl/5.8.8/" ;
    use IO::Socket::SSL;
    use CGI qw(:standard);
    my $cgi = new CGI;
    my $LOG ;
    open $LOG , ">>filename" ;
    my $username  = 'username@gmail.com';
    my $password  = '********' ;
    my $mailhost  = 'pop.gmail.com';
    my $port      = '995';
    my $pop = new Mail::POP3Client(
    USER     => $username,
    PASSWORD => $password,
    HOST     => $mailhost,
    PORT     => $port,
    USESSL   => 'true',
    DEBUG     => 0,
    if (($pop->Count()) < 1) {
    print $pop->Count() . " messages found!:$!\n";
    for(my $i = 1; $i <= $pop->Count(); $i++) {
     foreach($pop->Head($i)) {
     /^(From|Subject|Email):\s+/i && print $_, "\n";
    shabbir likes this.

Share This Page