Yii 1.1: ejabbersender

EJabberSender helps send a message with Jabber protocol
6 followers

EJabberSender helps send a message with Jabber protocol.

EJabberSender encapsulates the PHP XMPP Library functionality.

Usage ΒΆ

To use this component, you may insert the following code in a config file:

'components'=>array(
       ...
       'jabberSender'=>array(
           'class' => 'application.extensions.EJabberSender.EJabberSender',
           'host' => 'talk.google.com',
           'port' => 5222,
           'user' => 'username',
           'password' => '*******',
           'server' => 'gmail.com'
       ),
       ...
)

And in controller use the code

Yii::app()->jabberSender->sendMessage('user@gmail.com', 'Test, test, test');
Yii::app()->jabberSender->sendMessage('user@gmail.com', '111111111');

If you want to change the component settings, then use folowing code

$sender = Yii::app()->jabberSender;
$sender->user = 'newUser';
$sender->password = 'newPass';
$sender->prepareSender();
$sender->sendMessage('user@gmail.com', 'Test, test, test');
$sender->sendMessage('user@gmail.com', '111111111');

Total 1 comment

#6029 report it
Daniel at 2011/12/06 09:11pm
can it be used to receive messages?

Hi,

nice extension,

can it be used to receive messages? or when send the message is there any return values? whether the message is received or the receiver is not online?

thanks a lot before.

Leave a comment

Please to leave your comment.

Create extension
  • Yii Version: 1.1
  • License: MIT License
  • Developed by: segoddnja
  • Category: Web Service
  • Votes: +3
  • Downloaded: 408 times
  • Created on: Dec 5, 2011
  • Last updated: Dec 5, 2011