in reply to read gmail and extract cc field

Adding this line works fine for me:

$cc = $client->get_header($bs,"cc");

At least on an IMAP server I have access to. If that doesn't work for you, I guess it's a gmail-specific thing.

Replies are listed 'Best First'.
Re^2: read gmail and extract cc field
by Anonymous Monk on Jun 08, 2017 at 08:59 UTC

    No, I've tried that.

      I would then inspect whether Gmail IMAP even sends you the Cc header by using the ->parse_headers method.

      Maybe the name of the header is not cc but Cc.

      use Data::Dumper; warn Dumper $client->parse_headers( $msgid );

        I also tried Cc, doesn't work either. When i run your Data::Dumper code it says: $VAR1 = undef.