xmpp - How can I get Perl's Jabber::SimpleSend to work with Gmail chat? -
I am trying to write a simple Perl script to send an instant message. Jabber seemed like it could be the most favorable protocol. But the following script fails:
#! / Usr / bin / env perl using Jabber :: SimpleSend qw (send_jabber_message); Send_jabber_message ('me@gmail.com ',' censored ',' you@gmail.com ',' subject exam ', "body test"); It says:
can not call the "can_read" method on an undefined value at /opt/local/lib/perl5/site_perl/5.8 9 / XML / Stream PM line 1421 As Kartman responds, the code should really be
#! Use of / usr / bin / env parl: Jabbar :: simple QW (send_jabber_message); Send_jabber_message ('me%40gmail.com@talk.google.com', 'CENSORED', 'you%40gmail.com@talk.google.com', 'Subject examination', 'body test'); but it fails with the following error:
/ SUSL / ll / / SASL PM line 74 I have Authen :: SASL cpan module installed.
Jabber :: SimpleSend is an easy way to interact with a standard jabber server, but the name of the module is Do not mislead: gtalk indeed is a bit different, which requires TLS encryption (which will not override): and host name change Net :: XMPP will give you better results and with its API Can work directly.
Using the NET :: XMPP, 75 links were well commented in Perl, this Nagios is ready to send notifications, but it really is your requirement.
Comments
Post a Comment