Sunday, June 1, 2008

SMS Sender

The SMS Sender is javascript that formats an e-mail from your computer for delivery to your phone company's sms-email gateway. That gateway then forwards the email as a text message to your cell phone. On your cell phone, if you reply to that text message, it goes back to the gateway and is converted to an e-mail and sent to your email service.

It shows the mechanics of how a computer can send and receive messages from a cell phone and this is the essence of how sms marketing is done, except this is using your email client for demo purposes.

The javascript code is:

(SCRIPT LANGUAGE="JavaScript")(!--
function getLink(text) {
for (var i=0; i(document.links.length; i++)
if (document.links[i].href == text) return i;
return null;

function gmrAddr() {
var output = 'mailto:';
for (var i=0; i(document.smsGateways.selectName.length; i++) {
if (document.smsGateways.selectName[i].selected) {
if (output == 'mailto:')
output += '?to=' + document.smsGateways.selectName[i].value;
output += '&to=' + document.smsGateways.selectName[i].value;
document.links[mailtoLink1].href = output;

(FORM NAME="smsGateways")
(select name="selectName")
(option value="")Sprint Mobile(/option)
(option value="")Virgin Mobile(/option)
(option value="")Verizon Mobile(/option)
(option value="")Teleflip(/option)(/select)

(A HREF="mailto:gmr" onClick="gmrAddr()")Send Mail(/A)

(SCRIPT LANGUAGE="JavaScript")(!--
var gmrMail= getLink('mailto:gmr');

No comments: