By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,541 Members | 1,476 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,541 IT Pros & Developers. It's quick & easy.

gmail

P: 2
how to access to gmail with user and password ,i write something but it not work

Expand|Select|Wrap|Line Numbers
  1. #!/usr/bin/perl
  2.  
  3. use CGI;
  4. use LWP::UserAgent;
  5. use strict;
  6.  
  7.   print "Content-type: text/html\n\n";
  8.  
  9.   # Create a new user agent for HTTP request
  10.   my $ua = LWP::UserAgent->new( );
  11.  
  12.  my $URL = 'https://www.google.com/accounts/ServiceLoginAuth?service=mail'
  13.  
  14.  # Create HTTP request object
  15.   my $req =  HTTP::Request->new( POST => $URL);
  16.  
  17.  # Authenticate the user
  18.   $req->authorization_basic( $user, $pass);
  19.  
  20.  
Nov 6 '08 #1
Share this Question
Share on Google+
1 Reply


numberwhun
Expert Mod 2.5K+
P: 3,503
What are you trying to do, send emails? Have you tried this module from CPAN?
Nov 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.