in reply to reading body of email not working

The format in your printf only contains three variables but your mail body is the fourth. Just add another %s to the format.

Replies are listed 'Best First'.
Re^2: reading body of email not working
by Anonymous Monk on Jun 01, 2017 at 08:01 UTC
    Hm, good observation... I changed it but this line:
    printf( "[%04d] %s\n\t%s\n", $i, $es->header('From'), $es->header('Sub +ject'), $es->body);
    again does not show the body of the email...

      Still only three variables (except the number will be printed with 4 digits instead of three). Your next post is a little more helpful though.

      The documentation for top() in Net::IMAP::Simple states that it returns the lines of the header so it doesn't seem to be the correct way to access the body of the mail.

      As a matter of fact, this command:
      print $es->body;
      does not print anything...