PHP Classes

Laravel Etextmail: Send SMS messages via etextmail.com API

Recommend this page to a friend!
  Info   View files Documentation   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 27 This week: 1All time: 11,086 This week: 560Up
Version License PHP version Categories
laravel-etextmail 1.0BSD License5PHP 5, Wireless and Mobile, Web services
Description 

Author

This package can send SMS messages via etextmail.com API.

It can send HTTP requests to the etextmail.com API to execute several types of operations with SMS messages.

Currently it can short and long SMS messages, get the character count of a given message, and retrieve the balance of the account.

Picture of adeniyi ibraheem
  Performance   Level  
Name: adeniyi ibraheem <contact>
Classes: 6 packages by
Country: Nigeria Nigeria
Age: 36
All time rank: 18829 in Nigeria Nigeria
Week rank: 411 Up10 in Nigeria Nigeria Down

Documentation

Build Status Coverage Status Scrutinizer Code Quality Code Climate

Laravel-EtextMail

Laravel-etextmail is built on etextmail api (http://etextmail.com) which is an SMS gateway to send sms messages to cell phones on GSM and CDMA networks, Glo, MTN, Zain, Etisalat, Starcomms, Visafone in Nigeria and Globally.

To get the latest version of laravel-etextmail, simply

composer require ibonly\laravel-etextmail

Or include

"ibonly/laravel-etextmail: 1.0.*"

to your composer.json file and run composer update or composer install

Once Laravel EtextMail is installed, you need to register the service provider. Open up config/app.php and add the following to the providers key.

 Ibonly\EtextMail\EtextMailServiceProvider::class,

Also, register the Facade like so:

'aliases' => [
    ...
    'EtextMail' => Ibonly\EtextMail\Facades\EtextMail::class,
    ...
]

configuration (step 1)

Publish configuration file using the command bellow:

php artisan vendor:publish --provider="Ibonly\EtextMail\EtextMailServiceProvider"

A file etextmail.php containing default configuration settings will be added to config/ directory.

return [
    'senderid' => getenv('ETEXTMAIL_SENDER'),

    'username' => getenv('ETEXTMAIL_EMAIL'),

    'password' => getenv('EXTEXTMAIL_PASSWORD'),

    'url'      => getenv('ETEXTMAIL_URL'),
];

configuration (step 2)

Open your .env file and add your SMS Sender Id, etextmail email, etextmail password and etextmail url:

ETEXTMAIL_SENDER=xxxxx
ETEXTMAIL_EMAIL=xxxxx
EXTEXTMAIL_PASSWORD=xxxxx
ETEXTMAIL_URL=http://mail.etextmail.com

Note that resellers are to use their own url.

usage

use EtextMail;

class SMS
{
	/
	 * @return float
	 */
	public function getSMSBalance()
	{
		dd(EtextMail::getCreditBalance())
	}

	/
	 * @param  $message [the message to be processed]
	 * @return int
	 */
	public function	messageCount($message)
	{
		dd(EtextMail::getMessageCount($message));
	}

	/
	 * @param  $message [the message to be processed]
	 * @return int
	 */
	public function characterCount($message)
	{
		dd(EtextMail::getCharacterCount($message));
	}

	/
	 * @param  $destination [reciever's mobile number]
	 * @param  message      [the message to be processed]
	 * @return boolean
	 */
	public function sendSMS($destination, $message)
	{
		dd(EtextMail::sendMessage($destination, $message));
	}

	/
	 * @param  $destination [reciever's mobile number]
	 * @param  $message     [the message to be processed]
	 * @param  $longSMS     [number of pages]
	 * @return boolean
	 */
	public function sendLongSMS($destination, $message, $longSMS)
	{
		dd(EtextMail::sendMessage($destination, $message, $longSMS))
	}
	
	
}

Testing

$ vendor/bin/phpunit test

Contributing

To contribute and extend the scope of this package, Please check out CONTRIBUTING file for detailed contribution guidelines. Feel free to raise any issue or concern.

Credits

Laravel-etextmail is created and maintained by Ibraheem ADENIYI.


  Files folder image Files  
File Role Description
Files folder imageresources (1 directory)
Files folder imagesrc (2 files, 3 directories)
Files folder imagetests (1 file)
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file Readme.md Doc. Documentation

  Files folder image Files  /  resources  
File Role Description
Files folder imageconfig (1 file)

  Files folder image Files  /  resources  /  config  
File Role Description
  Accessible without login Plain text file etextmail.php Aux. Auxiliary script

  Files folder image Files  /  src  
File Role Description
Files folder imageExceptions (1 file)
Files folder imageFacade (1 file)
Files folder imageHelpers (1 file)
  Plain text file EtextMail.php Class Class source
  Plain text file EtextMailServiceProvider.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file EtextMailException.php Class Class source

  Files folder image Files  /  src  /  Facade  
File Role Description
  Plain text file EtextMailFacade.php Class Class source

  Files folder image Files  /  src  /  Helpers  
File Role Description
  Plain text file BaseController.php Class Class source

  Files folder image Files  /  tests  
File Role Description
  Plain text file EtextMailTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:27
This week:1
All time:11,086
This week:560Up