How to send an SMS with image to handphone? - sms

I'm using the service of a web site,and I can send text message using their interface(in PHP),but when I try to send an image :
<img src="http://www.google.com/images/srpr/nav_logo27.png" />
I'm receiving exactly the same code,not an image.
Anyone has experience with SMS services?

"Short Messages" are intended for plain text and losing money to Telcos. If you want do to anything with multimedia (like sending images), use EMS (Enhanced Message Service) or MMS (Multimedia Messaging Service). If you want to embed stuff from the web, use e-mail - the person who receives your message has to load the image from the internet anyway, and it's free for you if you send it from a computer.

Related

I can send Google Assistant messages to my windows application, but how do I send a message back?

I'm using IFTTT to send a Google Assistant message to my Windows application via Drop Box. If I say "[keyword] [message]" (for example: "Computer: Play Game of Thrones Season 2 Episode 4") IFTTT will write the text translation of [message] to a file on drop box that my application monitors and from there I can read the [message] and act on it.
What I would like to be able to do is send a reply back to the device that sent the message... For example if I tell my phone to have my computer start a movie on my computer and for whatever reason my app can't find the movie I want to be able to communicate that back to the device that originally sent the message, whether that be my cell phone or tablet or Google Home smart speaker.
I know there is probably no official way to do this but i'm looking for creative solutions (like the one I use to get the message in the first place)... anything at all that works even if it involves multiple third-party services.
There's no good way to send back an acknowledgement through the IFTTT integration. You'd need to build your own Action which would use something like push notifications to communicate between your local device and a cloud-based webhook.

Twilio SMS Physical Phone Integration

In a perfect world, the solution I'm looking for would be an api resource tied to my physical phone, e.g. I could POST an sms message to https://url.com/api/sms, and this api would have the end result of sending an sms from my physical phone. This means that the sms conversation would appear natively in my phone; if the recipient replies to the sms, it would appear just as a normal conversation as if I had physically typed the original sms via my phone.
I understand that I could set the replyto/callback/caller-id via Twilio's api. This would mean that the sms gets sent out by the api, and if the recipient replies to it, I could have the reply forwarded to my phone. But what would be missing in this scenario is the original message sent via the api, that the recipient is replying to.
Is there a streamlined way to achieve this, perhaps with Zapier?
One arduous solution I have in mind is to write an on-phone-app to intermediate the sms transmission so that I essentially have an sms-controlled api on the physical phone vs. a traditional http api. (On android, the api would "listen" via DATA_SMS_RECEIVED_ACTION and then send via sendTextMessage). But this seems cumbersome and would also require updating the app code when/if android changes the underlying SmsManager library. The advantage of this is that I could avoid Twilio altogether, by using my service provider's email-to-sms to send to the on-phone-makeshift-sms-api.
Twilio developer evangelist here.
I think you are looking for a feature that we just announced in preview. This is known as Hosted SMS and allows you to add SMS powered by Twilio to your existing phone number.
You need to apply to get access to Hosted SMS as it is newly in testing. You can do so with the form here: https://www.twilio.com/sms/hosted
I've set up texting to a physical phone by using Twilio's SIM cards and associating it to a phone number.

Markdown is not working in the Bot Framework Twilio channel

I am trying to create a simple bot that sends images and hyperlinks by SMS using Twilio (trial account).
I do get the reply from the bot , but none of the markdown is working, even simple markdown elements like text or bing
Sample code I am using to send the message through Twilio SMS channel:
public async Task<Message> Post([FromBody]Message message)
{
if(message.Text == "Hello")
{
string messageText = "![Sample Image](http://aka.ms/Fo983c)";
return message.CreateReplyMessage(messageText);
}
Am I missing something? The emulator displays the image and other markdown properly, but when I test using my android phone and text the Twilio number to connect to the bot, it delivers raw HTML and not the rich content.
Twilio developer evangelist here. As pointed our earlier SMS is text only, so markdown or any other formatting will not work.
I just tried sending a message from a bot, and while I get the image correctly on the emulator or webchat, on SMS I only get the URL of the image (i.e. http://aka.ms/Fo983c).
According to the documentation, this is the expected behavior as it states:
Not all channels can represent all markdown fields. As appropriate
channels will fallback to a reasonable approximation, for example,
bold will be represented in text messaging as bold
So I guess for images, it will always fallback to the URL of the image.
As for sending MMS, it appears right now the botframework doesn't support it. To be clear, Twilio itself does support MMS for US and Canada, but it seems Microsoft's implementation didn't take advantage of that right now.
Hope this helps you.
I did this when I was first trying out the framework. Sorry but I don't have that code anymore however I don't recall having to do anything special. I simply sent a picture from my phone to my twilio number and then in the message properties for the message received by the bot there was an attachment field with a URL pointing to the image sent from my phone. Then I used a regular web request to pull down the image.
The details for the attachment objects and content url fields are outlined here.
Because there's no way to emulate the SMS channel you'll have to publish the code live to be able to test it out.
Have fun!

Can you send rich text messages via Twilio?

I am trying to send a rich text message via Twilio. I am able to send regular SMS messages, but I want to include a hyperlink in the body of the text.
I tried the twilio mediaUrl to include an rtf file, but that didn't work. Including html in the body of a message doesn't work as it just sends in plain text.
I'm posting via curl to the twilio endpoints, so i'd prefer not to have to get into PHP or some other language to achieve this. I just want to send raw data to twilio and receive a rich text message back, if it's possible.
Twilio developer evangelist here.
Using Twilio you can send MMS messages to numbers in the US and Canada. When you pass a mediaUrl the file needs to be hosted somewhere publicly on the web and it will then be included within the message.
You can pass files of any of the mime types listed here, though when sending RTF the result will depend on how well the receiving device supports RTF files.
If you want to include a link, I'd recommend shortening the URL (using bit.ly or similar) and just sending it as part of the text. Most smart phones will auto link the URL. Built in SMS apps on phones don't support markup of any sort, which is why your attempt with HTML just showed the raw markup.
Let me know if this helps at all.

Simulating an attachment in the emailtask

In phone7 development, being able to send an email requires the use of the email task. This object doesn't not have an attachments property, and many ppl on various forums have complained about this particular lack of functionality. The problem is that Microsoft applications such as the picture gallery and OneNote have the ability to attach images and sound recordings to emails. This implies that there is a way to attach them.
Question: Is there a "hack" or other method that can be used to send emails with attachments in phone7?
No, there is no way to send attachments via the EmailComposeTask in a third party app. If you don't want to use an EmailComposeTask, you could create a server that runs a webservice which performs the sending of the email. Your app could then upload the attachment to that webservice.

Resources