You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi , Im facing issue installing the lib . im not using composer ans do not want to use it can you tell me how can i install the sms lib whithout using composer ?
Thanks in advance !
The text was updated successfully, but these errors were encountered:
Then you will need to include it in your project with manual require or include calls,
I did not do that for years but if I remember correctly, something like this should work.
Then you should be able to use those classes in the same way as composer :
// Replace the identifiants with the one you wish to use
$smsClient = new SmsApi('your-app-key', 'your-app-secret', 'ovh-eu', 'your-consumer-key');
// Get declared accounts
$accounts = $smsClient->getAccount();
// Get declared senders
$senders = $smsClient->getSenders();
if ((count($accounts) > 0) && (count($senders) > 0)) {
$smsClient->setAccount($accounts[0]);
$smsClient->setSender($senders[0]);
$sms = $smsClient->createMessage();
// Phone number who will receive the SMS
$sms->addReceiver('+33601020304');
// Define SMS options
$sms->setIsMarketing(false);
$sms->setDeliveryDate(new DateTime('now'));
// Send the message
$sms->send('This is a test message');
} else {
die('Unable to send SMS : there is no account or sender defined for those credentials.');
}
Hi , Im facing issue installing the lib . im not using composer ans do not want to use it can you tell me how can i install the sms lib whithout using composer ?
Thanks in advance !
The text was updated successfully, but these errors were encountered: