使用vTiger实例发送短信

时间:2016-09-27 06:54:13

标签: php vtiger smsmanager vtigercrm

<?php
include_once 'vtlib/Vtiger/Utils.php';
require_once('include/database/PearDatabase.php');
require_once 'config.inc.php';
require_once 'includes/Loader.php';
require_once 'modules/SMSNotifier/SMSNotifier.php';
vimport ('includes.runtime.EntryPoint');

$user = Users_Record_Model::getCurrentUserModel();
GLOBAL $adb;

$tonumbers = array('994255xxxx');
$message = "Test From Ramesh";

$provider = SMSNotifierManager::getActiveProviderInstance();
if( $provider ){
    $provider->send($message, $tonumbers);
}
?>

使用getActiveProviderInstance获取提供程序实例。并从该实例调用send函数。

1 个答案:

答案 0 :(得分:1)

试试这个

completion(true)