Can we have iphone prompt the SMS screen with a pre populated message & phone#?

Posted on 2011-10-19
Last Modified: 2014-01-27
I have a mobile web page with a link when clicked on an iphone
should prompt the SMS screen with a pre-populated message and
a pre-populated phone# in it.

right now below is the code we are using, and its not working.

<a href="sms:12345678900?body=messagebodyhere">Send me a text</a>

if we just use         <a href="sms:12345678900">Send me a text</a>

It works, but it doesn't populate the body of the text message.

I'd like to it work where someone clicks a link, the SMS screen opens,
and both the phone# and the text message are pre-populated, so all
the user has to do is touch "send" to send the SMS.

Does anyone know how to make this work?
Question by:myddotorg
    1 Comment
    LVL 75

    Accepted Solution

    From the developer site:

    Text Links

    Note: Text links are supported on iOS only.

    The sms scheme is used to launch the Text application. The format for URLs of this type is “sms:<phone>”, where <phone> is an optional parameter that specifies the target phone number of the SMS message. This parameter can contain the digits 0 through 9 and the plus (+), hyphen (-), and period (.) characters.
    The URL string must not include any message text or other information.

    The following examples show strings formatted for Safari and for native applications.

        HTML links:

        <a href="sms:">Launch Text Application</a>

        <a href="sms:1-408-555-1212">New SMS Message</a>

        Native application URL strings:



    iOS Note: If the Text application is not installed on the device, clicking an sms URL displays an appropriate warning message to the user.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Training Course: Android App Development

    This course will involve creating widgets, customize list view, grid view, spinners, etc. Creating applications using audio, video, and SQLite database. Ending with publication on Google Play.

    Working settings for French ISP Orange "Prêt à Surfer" SIM cards for data connections only. Can't be found anywhere else !
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    This video teaches users how to migrate an existing Wordpress website to a new domain. provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

    794 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now