Skip Menu |

This queue is for tickets about the Mail-Webmail-Gmail CPAN distribution.

Report information
The Basics
Id: 7516
Status: resolved
Worked: 5 min
Priority: 0/
Queue: Mail-Webmail-Gmail

People
Owner: mincus [...] cpan.org
Requestors: bender [...] impala.mine.nu
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.09
Fixed in: (no value)



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
From: mincus
Try the following script, and let me know if it works for you. --mincus [guest - Sat Aug 28 10:26:18 2004]: Show quoted text
> 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
#!/usr/bin/perl use Mail::Webmail::Gmail; my $username = "username"; my $password = "password"; 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 } ) { print $_->{ 'sender_email' }, "\n"; } }
From: Fredrick
Which script? Sorry, but I onle see the script I submitted in the bug report (this is my first bug report, so I could be missing something). BR Fredrick Nilsson [guest - Sat Aug 28 10:33:15 2004]: Show quoted text
> Try the following script, and let me know if it works for you. > > --mincus > > [guest - Sat Aug 28 10:26:18 2004]: >
> > 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
> >
Its down near the bottom of the message that I sent to you, it says "Download 7516.pl" I have pasted the script into this reply as well. Let me know if it works as you intended. --mincus Show quoted text
----Start Script---- #!/usr/bin/perl use Mail::Webmail::Gmail; my $username = "username"; my $password = "password"; 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 } ) { print $_->{ 'sender_email' }, "\n"; } }
----End Script---- [guest - Sat Aug 28 13:32:04 2004]:
> Which script? Sorry, but I onle see the script I submitted in the bug > report (this is my first bug report, so I could be missing
something).
> > BR > Fredrick Nilsson > > [guest - Sat Aug 28 10:33:15 2004]: >
> > Try the following script, and let me know if it works for you. > > > > --mincus > > > > [guest - Sat Aug 28 10:26:18 2004]: > >
> > > 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
> > > >
> >
From: Fredrick
Yepp! The script worked fine. Sorry about not spotting the file and thanks for a very nice module! BR Fredrick [MINCUS - Sat Aug 28 14:56:10 2004]: Show quoted text
> Its down near the bottom of the message that I sent to you, it > says "Download 7516.pl" > > I have pasted the script into this reply as well. Let me know if it > works as you intended. > > --mincus > > ----Start Script---- > #!/usr/bin/perl > > use Mail::Webmail::Gmail; > > my $username = "username"; > my $password = "password"; > > 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 } ) { > print $_->{ 'sender_email' }, "\n"; > } > } > ----End Script---- > > [guest - Sat Aug 28 13:32:04 2004]: >
> > Which script? Sorry, but I onle see the script I submitted in the
> bug
> > report (this is my first bug report, so I could be missing
> something).
> > > > BR > > Fredrick Nilsson > > > > [guest - Sat Aug 28 10:33:15 2004]: > >
> > > Try the following script, and let me know if it works for you. > > > > > > --mincus > > > > > > [guest - Sat Aug 28 10:26:18 2004]: > > >
> > > > 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
> > > > > >
> > > >
> >