in reply to Re^3: Sending email from a Vista machine with ActiveState PPM modules
in thread Sending email from a Vista machine with ActiveState PPM modules

You can get nmake for free from MS. ( A [id://Super Search] for 'nmake' would have found Link to download NMAKE from M$).

However, Mail::WebMail::Gmail is a pure perl module, so it can be installed manually. But just download nmake from the link above and put it somewhere in your path. Then try again.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^5: Sending email from a Vista machine with ActiveState PPM modules
by Anonymous Monk on Apr 11, 2008 at 14:14 UTC
    So I managed to install the the Gmail componnent on my machine by installing another repository

    http://trouchelle.com/ppm10/package.xml

    I use the following for code

    use strict; use Crypt::SSLeay; use HTTP::Cookies; use HTTP::Headers; use HTTP::Request::Common; use LWP::UserAgent; use Mail::Webmail::Gmail; my ( $gmail ) = Mail::Webmail::Gmail->new(username => 'my_username', p +assword => 'my_password' ); ### Test Sending Message #### my $msgid = $gmail->send_message( to => 'drblove@yahoo.com', subject = +> time(), msgbody => 'Test' ); print "Msgid: $msgid\n"; if ( $msgid ) { if ( $gmail->error() ) { print $gmail->error_msg(); } else { ### Create new label ### my $test_label = "tl_" . time(); $gmail->edit_labels( label => $test_label, action => 'create' +); if ( $gmail->error() ) { print $gmail->error_msg(); } else { ### Add this label to our new message ### $gmail->edit_labels( label => $test_label, action => 'add' +, 'msgid' => $msgid ); if ( $gmail->error() ) { print $gmail->error_msg(); } else { print "Added label: $test_label to message $msgid\n"; } } } }
    I get the following error:

    Use of uninitialized value $host in concatenation (.) or string at C:/ +Perl/lib/LWP/Protocol/http.pm line 25. Use of uninitialized value $page in pattern match (m//) at C:/Perl/sit +e/lib/Mail/Webmail/Gmail.pm line 1425. Msgid: Use of uninitialized value $msgid in concatenation (.) or string at E: +\Bioreka\gmail\test.pl line 12.
      I get the following error

      The "error" you quoted is not an error at all. Those are simply warnings - the fact that $host, $page and $msgid are uninitialized is only a problem if they need to contain certain (initialized) values.

      If that was the only warnings you got, and the message was sent, then all is well (at least as regards that particular exercise :-)

      Cheers,
      Rob
        Hi Rob,

        Thanks for reply, I appreciate the time... when I ran this code (believe me I spent a day trying to run it various ways) I never successfully sent an email via gmail... I found a way to do it with Yahoo with a paid service (see in this thread if you are interested)... though I am curious if I could do this with a UserAgent and a day to play... Will stick that in my free time to do list and see if I have any success, if so I will be sure to post...