in reply to Re^2: read email-message
in thread read email-message
Try using ($msgid,1) in ->bodypart_string
poj#!/usr/bin/perl use strict; use Mail::IMAPClient; my $client = Mail::IMAPClient->new( Server => 'imap.gmail.com', User => 'abc@gmail.com', Password => '**********', Ssl => 1, Uid => 1, ); $client->select("INBOX"); my @messages = $client->messages; my $msgid = pop @messages; my $text = $client->bodypart_string($msgid,1) or die "Could not get bodypart string: ", $client->LastError; print $text; $client->logout or die "Logout error: ", $client->LastError, "\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: read email-message
by Anonymous Monk on Dec 17, 2017 at 11:05 UTC | |
by Corion (Patriarch) on Dec 17, 2017 at 11:19 UTC | |
by Anonymous Monk on Dec 17, 2017 at 12:42 UTC |