Hi I am trying to send a msn message from perl msn messenger but I am trying to send am essage and nothing works.
This is the cod eI am using could someone tell me where i am going wrong please.
Expand|Select|Wrap|Line Numbers
- #!/usr/bin/perl
- use Net::Msmgr;
- use Net::Msmgr::Session;
- use Net::Msmgr::User;
- $ssid = "msncontact@hotmail.com";
- $message = "Test from perl client";
- our $session = new Net::Msmgr::Session;
- our $user = new Net::Msmgr::User(
- user => 'username@hotmail.com',
- password => 'password',
- );
- $session->user($user);
- $session->login_handler( sub { shift->Logout } ) ;
- #$session->connect_handler () ;
- $session->Login;
- print "Username is: ", $user->user ."\n";
- #Initiate list syncronization.
- $session->ui_sync;
- print"$session->ui_sync \n";
- #Ping the Notification Server.
- print "$session->ping \n";
- #Online Status
- $session->ui_state_nln;
- print "$session->ui_state_nln";
- $session->ui_new_conversation;
- $session->ui_send_message($ssid, $message);