Subject: | impossible to retrieve sender |
With the following code, I can't be able to retrieve the sender of an email (pretty much the example code):
#!/usr/bin/perl
use Mail::Webmail::Gmail;
my $username = "username";
my $password = "pass";
my $gmail = Mail::Webmail::Gmail->new(
username => $username, password => $password,
);
my $messages = $gmail->get_messages( label => $Mail::Webmail::Gmail::FOLDERS{ 'INBOX' } );
if( defined( $messages )) {
foreach ( @{ $messages } ) {
if ( $_->{ 'new' } ) {
print $_->{ 'sender' };
}
}
}
Should be easy to recreate by using the test code above.
BR
Fredrick Nilsson