Skip to content

mhndev/messaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Messaging Service

Test with Gmail mail server

$message = new \mhndev\messaging\EmailMessage(
    '[email protected]',
    'my message body',
    'my subject',
    '[email protected]',
    '[email protected]',
    '[email protected]'

);

$myEmail = '[email protected]';
$myEmailPassword = 'password';

$transporter = new \mhndev\messaging\SmtpSwiftTransporter('smtp.gmail.com', 465, 'ssl' , $myEmail, $myEmailPassword);

$transporter->transport($message);

Send Sms

$novinPayamak = new \mhndev\messaging\NovinPayamak([
    'wsdl' => 'http://www.novinpayamak.com/services/SMSBox/wsdl',
    'Auth'=> [
        'number'=> '50005725045',
        'pass'=>'password',
    ],
    'encoding' => 'UTF-8'
]);

$message = new \mhndev\messaging\SmsMessage('09355497674', 'Mr Naderi Sms works too ;). good night.');
$result = (new \mhndev\messaging\twoGMessageTransporter())->setProvider($novinPayamak)->transport($message);

var_dump($result);
die();