Hi,
I don't know if anybody tried that before. I want to use Twilio https://www.twilio.com/
to get a SMS each time a message is sent from my eMail form.
When I use the folllowing code:
I get a 500 error. but if I use the exact same code on a regular php page, it works without problem
Did I miss something?
Thanks if you can help.
Paolo
I don't know if anybody tried that before. I want to use Twilio https://www.twilio.com/
to get a SMS each time a message is sent from my eMail form.
When I use the folllowing code:
- Code: Select all
<cms:if k_success>
<cms:php>
require __DIR__ . 'twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;
$sid = 'xxxxxx';
$token = 'xxxxxx';
$client = new Client($sid, $token);
$client->messages->create(
'+xxxxxxxx',
array(
'from' => '+xxxxxxxx',
'body' => "You received a message from TST. Check your eMails."
)
);
</cms:php>
I get a 500 error. but if I use the exact same code on a regular php page, it works without problem
Did I miss something?
Thanks if you can help.
Paolo