473,385 Members | 1,588 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problems sending IM from perl MSN messenger

154 100+
Problems sending IM from perl MSN messenger

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
  1. #!/usr/bin/perl
  2.  
  3. use Net::Msmgr;
  4. use Net::Msmgr::Session;
  5. use Net::Msmgr::User;
  6.  
  7. $ssid = "msncontact@hotmail.com";
  8. $message = "Test from perl client";
  9.  
  10. our $session = new Net::Msmgr::Session;
  11. our $user = new Net::Msmgr::User(
  12.     user => 'username@hotmail.com',
  13.     password => 'password',
  14. );
  15. $session->user($user);
  16. $session->login_handler( sub { shift->Logout } ) ;
  17. #$session->connect_handler () ;
  18. $session->Login;
  19.  
  20. print "Username is: ", $user->user ."\n";
  21.  
  22. #Initiate list syncronization.
  23. $session->ui_sync;
  24. print"$session->ui_sync \n";
  25.  
  26. #Ping the Notification Server.
  27. print "$session->ping \n";
  28.  
  29. #Online Status
  30. $session->ui_state_nln;
  31. print "$session->ui_state_nln";
  32.  
  33. $session->ui_new_conversation;
  34.  
  35. $session->ui_send_message($ssid, $message);
Apr 30 '07 #1
4 2302
KevinADC
4,059 Expert 2GB
change this line:

Expand|Select|Wrap|Line Numbers
  1. $ssid = "msncontact@hotmail.com";
to:

Expand|Select|Wrap|Line Numbers
  1. $ssid = 'msncontact@hotmail.com';
and see if that helps.

The double quotes in your code is causing perl to treat @hotmail as if it were an array, an empty one in this case, so $ssid is being defined as "mscontact.com" instead of "msncontact@hotmail.com". The single-quotes in my suggestion will eliminate that problem.
Apr 30 '07 #2
jonathan184
154 100+
Hi Kevin

I did that change but it did not work.

any other ideas?
Apr 30 '07 #3
KevinADC
4,059 Expert 2GB
Sorry, I don't know anything about those particular modules, I would have to read the documentation to see if you are using them correctly, but you can do that as well as I can.
Apr 30 '07 #4
Hey guys,

I'm trying to use the same package (net-msmgr) to send IM from Perl, but with no luck either. I know for one, or at least I'm pretty sure, that your ssid Jonathan should not be set to an email address. It should be some network identifier which I'm sad to say I don't know what it should be either.

I think you should be passing the email of the person you want to chat with to your Conversation object. Also, I'm pretty sure you need to associate a switchboard with your conversation as well and you send the switchboard the ssid.
Expand|Select|Wrap|Line Numbers
  1. my $switchBoard = new Net::Msmgr::Switchboard( ssid => '8888' );
  2. $conversation->switchboard( $switchBoard );
  3.  
I really wish there was more documentation on this package.

Please let me know if anyone has made any progress on this.

-Karim Varela
Jul 27 '07 #5

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

Similar topics

15
by: Sven Templin | last post by:
Hello all, our configuration is as following described: - OS: Windows 2000 - Apache server 1.3 - Php 3.8 - MS outlook client 2000 _and_ no SMTP server available in the whole intranet.
2
by: Edwin Quijada | last post by:
Hi! Where can I find examples to accesing postgres with perl. TIA _________________________________________________________________ Charla con tus amigos en línea mediante MSN Messenger:...
2
by: deepak | last post by:
Hi, Could anyone please tell me which yahoo messenger dll is used for sending messeges to another yahoo user through c# or vb or vc code? -- bfgbcbcxvbcxbcxvbcxbxcbxcbcfdsgsdgfsdgx
1
by: Dan Watson | last post by:
I applogogise... This isn't a VB.NET issue - but my ISP dosnt give's me tough love when it comes to just VB newsgroups here goes: HI guys... I am having a serious bug with my program called...
2
by: David Kanter | last post by:
Hi, I am relatively inexperienced with VB.Net, but I am familiar with many concepts from programming; I have some basic level of competence with C/C++ and Perl, but I just started using VB this...
0
by: Page O Rama | last post by:
Hi, R U BLOCKED ON MSN,YAHOO,ICQ OR AOL Messenger By Your Friend, Then What are you waiting for.Visit one of the link below to find out who has blocked you in his/her friend list. MSN Block...
2
by: subsanta | last post by:
My computer has so many problems and ive looked around on the internet and ive managed to fix some of them. I know that i have a few viruses on my computer, but i cant get rid of them, in one case i...
0
by: Astan Chee | last post by:
Hi, Im trying to implement the logic from http://www.hypothetic.org/docs/msn/general/http_connections.php to a simple python code using urllib2 and some parts of urllib. Im behind a http proxy...
31
by: happyse27 | last post by:
Hi All, I am trying for weeks how to send email from windows pc, which from my gmail account to my hotmail account. Using net::smtp module sending email failed,Kindly assist. (for the item d it...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.