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');
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.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.