user3545006 user3545006 - 1 year ago 61
PHP Question

Php - Twilio MMS not sending if image link is broken/unavailable

I have an application that uses Twilio to send MMS messages. It works fine; however, when the image link provided is broken/unavailable, it does not continue to send the MMS.

In my application I have a module that sends the image to the server via FTP. From that, I get the URL of that image and attach it on the MMS message. For some reason, if the image doesn't successfully uploaded to the server via FTP, the image link will be broken, and thus it does not send the MMS.

Can you please help me resolving this issue?



Megan from Twilio here.

Sending MMS messages relies on the MediaURL thus if the URL you are trying to send through is broken, it will not work.

In the example:

    'To' => "+16518675309", 
    'From' => "+14158141829", 
    'Body' => "Check out this awesome image!", 
    'MediaUrl' => "",  

if the flickr image link were to break you would not receive the MMS portion of this message.

I've dealt with some tricky ways of handling image URLs via the file system in this post, perhaps you will need to finagle something similar into your code.

Hope this helps!