denne htmlkode burde sende smser til en mobil
<html>
<head>
<title>SMS Sender</title>
</head>
<body>
<h3>SMS Sender</h3>
<%
smsTo = Request("to")
smsFrom = Request("from")
smsSubject = Request("subject")
If smsTo <> "" Then
If Not IsNumeric(smsTo) Then
Response.Write("Mobilnummer må kun indeholde tal<br><br>" & vbNewLine)
Else
smsTo = smsTo*1
If smsTo >= 20100000 And smsTo < 20600000 Then
smsEmail = smsTo & "@sms.tdm.dk"
ElseIf smsTo >= 20600000 And smsTo < 21000000 Then
smsEmail = smsTo & "@note.sonofon.dk"
ElseIf smsTo >= 21100000 And smsTo < 22000000 Then
smsEmail = smsTo & "@sms.tdm.dk"
ElseIf smsTo >= 22100000 And smsTo < 23000000 Then
smsEmail = smsTo & "@note.sonofon.dk"
ElseIf smsTo >= 23000000 And smsTo < 24000000 Then
smsEmail = smsTo & "@sms.tdm.dk"
ElseIf smsTo >= 26100000 And smsTo < 26900000 Then
smsEmail = smsTo & "@sms.mobilix.dk"
ElseIf smsTo >= 28100000 And smsTo < 28900000 Then
smsEmail = smsTo & "@sms.mobilix.dk"
ElseIf smsTo >= 40100000 And smsTo < 40500000 Then
smsEmail = smsTo & "@sms.tdm.dk"
ElseIf smsTo >= 40500000 And smsTo < 50000000 Then
smsEmail = smsTo & "@note.sonofon.dk"
End If
If smsEmail <> "" Then
Set userMail = Server.CreateObject("JMail.SMTPMail")
'*** mail.mydomain.dk skal rettes til den mail-server der er tilknyttet dit webhotel ***
userMail.ServerAddress = "mail.mydomain.dk"
userMail.SenderName = smsFrom
userMail.AddRecipient smsEmail
userMail.Body = smsSubject
userMail.Execute
userMail.Close
Set userMail = nothing
Response.Write("Din SMS er nu sendt<br><br>" & vbNewLine)
smsTo = ""
smsFrom = ""
smsSubject = ""
Else
Response.Write("Det indtastede mobilnummer er ikke gyldigt<br><br>" & vbNewLine)
End If
End If
End If
%>
<FORM ACTION="#" METHOD=POST name="sms">
<table border=0 CELLPADDING=0 CELLSPACING=0>
<tr><td>Til mobilnr.</td><td><INPUT name="to" value="<%=smsTo%>" size=8></td></tr>
<tr><td>Fra</td><td><INPUT name="from" value="<%=smsFrom%>" size=20 onkeyup="charCount()" onchange="charCount()"></td></tr>
<tr><td>Besked</td><td><textarea name="subject" cols="20" rows="4" wrap="virtual" onkeyup="charCount()" onchange="charCount()"><%=smsSubject%></textarea></td></tr>
<tr><td>Tegn tilbage</td><td><INPUT name="left" size=3 value=180></td></tr>
<tr><td colspan=2><center><INPUT type="submit" value=" Send "></center></td></tr>
</table>
</form>
<script>
<!--
//Script by Ricki Runge
//Find more at
www.script.dkfunction charCount() {
document.sms.left.value = 180 - document.sms.subject.value.length - document.sms.from.value.length;
if (document.sms.left.value < 0) {
alert("Beskeden kan ikke være mere end 180 tegn");
}
}
charCount();
//-->
</script>
</body>
</html>