I want to forward the voicemail recording left on my Twilio account using Twilio studio. I am following the article posted here https://support.twilio.com/hc/en-us/articles/223132287-Forwarding-Recordings-to-Your-Email but I only get empty email without audio recording link. I am new with studio and twilio so I'd appreciate your help. The code I added to my server is the following with the exception of the email address. The name of the file is send.php.
<?php
header('Content-type: text/xml');
echo '<?xml version="1.0" encoding="UTF-8"?>';
echo '<Response></Response>';
$to = "your-email@example.com"; // Update with your email address
$subject = "Message from {$_REQUEST['From']}";
$message = "To listen to this message, please visit this URL: {$_REQUEST['RecordingUrl']}";
$headers = "From: webmaster@example.com"; // Update with your sending address
mail($to, $subject, $message, $headers);
On my Studio flow I added the "Record Voicemail" widget, then my "IF RECORDING COMPLETE" transition is a HTTP POST request to my file send.php with the code above. Can someone please guide me? I can't find articles or video tutorials. Thanks!