7 our @EXPORT = qw(&sendXmpp &flushXmpp);
12 my( $to, $subject, $body ) = @_;
13 push @pending, [ $to, $subject, $body ];
17 return unless @pending;
18 open JELNET, "|$config{jelnet} --silent-passwd \"$config{xmpp_name}\" > /dev/null" or die "Could not start XMPP sender\n";
19 print JELNET $config{"xmpp_passwd"}."\n";
21 my( $to, $subject, $body ) = @{$_};
22 $subject =~ s/&/&/g;
23 $subject =~ s/'/'/g;
24 $subject =~ s/"/"/g;
28 print JELNET "<message to='$to'><subject>$subject</subject><body>$body</body></message>";
33 checkConf( [ "xmpp_name", "xmpp_passwd", "jelnet" ] );