General format: <a href="sms:+919999999999?body=Hello World!">Link</a>
You can also add several numbers to the recipient list:
<a href="sms:+919999999999,+919999999990?body=Hello World!">Link</a>
I found that this works on my Android device as well:
<a href="sms://+919999999999?body=Hello%20World!">Single recipient and encoded body</a>
A small demonstration:
body {
font-family: monospace;
text-align: center;
}
a {
font-size: 24px;
}
code {
font-size: 18px;
line-height: 26px;
white-space: normal;
word-break: break-word;
background-color: lightgray;
padding: 5px;
border-radius: 4px;
}
h1 {
margin-bottom: 5%;
}
<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<h1> Run this Snippet on an actual mobile device to check if it supports the special links</h1>
<hr>
<pre><code><a href="sms:+919999999999?body=Hello World!">Single recipient and plain body</a></code></pre>
<a href="sms:+919999999999?body=Hello World!">Single recipient and plain body</a>
<pre>
<br>
</pre>
<pre><code><a href="sms:+919999999999,+919999999990?body=Hello World!">Multile recipient and plain body</a></code></pre>
<a href="sms:+919999999999,+919999999990?body=Hello World!">Multile recipient and plain body</a>
<pre>
<br>
</pre>
<pre><code><a href="sms://+919999999999?body=Hello%20World!">Single recipient and encoded body</a></code></pre>
<a href="sms://+919999999999?body=Hello%20World!">Single recipient and encoded body</a>
</body>
Run codeHide result: SMS-
, SMS, , .
, ; .