Web Analytics Made Easy -
StatCounter Pop3 - CodingForum

Announcement

Collapse
No announcement yet.

Pop3

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pop3

    Hello,

    I am trying to use Net::Pop3

    $pop = Net::POP3->new('mail.torchhost.com', Timeout => 60);
    $username="username";
    $password="pass";
    if ($pop->login($username, $password) > 0) {
    my $msgnums = $pop->list; # hashref of msgnum => size
    foreach my $msgnum (keys %$msgnums) {
    my $msg = $pop->get($msgnum);
    print @$msg;
    }
    }

    This is fine.

    This prints a whole list of stuff- but it's missing one major thing- the EMAIL address that's it's from.

    It gives the name of who it is from, but not who it is from.

    This is the output i am getting from my script:
    http://support.torchhost.com/test.txt

    As you can see- there is no email address given.

    Maybe as well, someone could give me some pointers into simply recording:
    Email, Subject, Message.

    I don't want anything fancy to be stored- just the message and email, because i need to store it into a MySQL database.

    Thanks

  • #2
    if you are viewing the emails in a browser and the emails are enclosed in < >, then the browser sees an HTML tag. you have to change the <>'s to &gt; and &lt; so the browser interprets them correctly

    otherwise, i dunno
    "There is more than one way to do it."

    Comment

    Working...
    X