SMS Support for iPhone Friendly Websites
The OS 2.0 software on the iPhone now supports integration with the SMS application from MobileSafari, allowing users to send SMS messages to you simply by tapping a specially formatted hyperlink on your website.
The iPhone is capable of interacting with many native iPhone applications as we’ve discussed previously, however the new software presents many new capabilities which we plan to cover over the coming weeks.
To create an sms link on your website, use the following syntax:
<a href="sms:12125551212">Send SMS to 1(212)555-1212</a>
The iPod touch lacks a native SMS application, therefore this will only work on iPhones (running 2.0). Also, Its worth noting many cellphones can accept SMS sent via email as well, providing they are formatted as number@provider.com (check with your provider for specifics).
Nonetheless, support to interact with the native SMS application is another capability web developers can use to provide optimized content to their iPhone visitors. Thanks to Fox Tucker for bringing this tip to our attention. Let us know what you think in the comments!
-Shaun Mackey













Comment by jindrab: August 1, 2008 @ 6:02 am
Hi,
does anybody know it is possible to specify prepared text for the sms link?
Comment by admin: August 1, 2008 @ 9:34 pm
Hi Jindrab,
Assuming you would like to change the text displayed for the link, just change “Send SMS to 1(212)555-1212″ in the example above to whatever you would like the text to say.
Hope that helps!
-Admin
Comment by jindrab: August 3, 2008 @ 10:10 pm
Hi,
thanks for reply, but I didn’t think the text displayed as a link. When sms link is invoked on iPhone, appropriate application is invoked to send sms to the number specified in href=”sms:…”. Is there any way how to make the application consume body of the sms? This feature would very help me but I can’t find anything in documentation of iPhone.
Comment by shakkalakka: September 11, 2008 @ 12:59 am
Hi,
I ‘m looking for a solution to pass some body text for the sms to the SMS editor too. If someone has any advice on this, that would be great.