2
<?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 获取提供者实例。并从该实例调用发送函数。

4

1 回答 1

2

试试这个

<?php
include_once 'includes/main/WebUI.php';
require_once 'includes/Loader.php';
require_once 'modules/SMSNotifier/SMSNotifier.php';
$tonumbers = array('994255xxxx');
$message = "Test From Ramesh";
SMSNotifier::fireSendSMS($message, $tonumbers);
于 2018-06-14T13:36:43.270 回答