$client = AWS::createClient('Sns');
$sms = [
'Message' => 'sms_content',
'PhoneNumber' => 'sms_recipient',
'MessageAttributes' => [
'AWS.SNS.SMS.SenderID' => [
'DataType' => 'String',
'StringValue' => 'AD'
],
'AWS.SNS.SMS.SMSType' => [
'DataType' => 'String',
'StringValue' => 'Transactional'
],
]
];
$result = $client->publish($sms);
Example of Sending SMS in PHP Using AWS SNS


Leave a Reply