How Can i Send Message to all mobile

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Balabhadra Kar
    New Member
    • Jan 2008
    • 1

    #1

    How Can i Send Message to all mobile

    Hello
    how can i send message to all mobile set using asp code .Please Help me.



    thnak.s
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Hello Balabhadra Kar,

    Give this a try. Save the code as “SMSExample.asp ” without the quotes.

    More gateways for other providers can be found at: http://en.wikipedia.org/wiki/SMS_gateways

    Hope this helps~

    [code=asp]
    <%
    If (Request.Form(" SendMessage")) Then
    Set myMail=CreateOb ject("CDO.Messa ge")
    myMail.Subject = ""
    myMail.From = Request.Form("P honeNumber") & Request.Form("C arrier")
    myMail.To = Request.Form("P honeNumber") & Request.Form("C arrier")
    myMail.TextBody = Request.Form("Y ourMessage")

    On Error Resume Next
    myMail.Send
    If Err <> 0 Then
    Response.Write( "<h3><Font Color='#FF0000' >Error occurred: <i>" & Err.Description & "</i></Font></h3>")
    else
    Response.Write( "Your message was sent successfully.")
    End If
    Response.End
    End If
    %>

    <html>
    <head>
    <title>Exampl e</title>
    </head>
    <body>
    <form method="post" action="Test30. asp" name="xform" id="xform">
    <input name="SendMessa ge" type="hidden" value=true>
    <table border="0">
    <tr>
    <td>Phone Number:</td>
    <td><input name="PhoneNumb er" type="text"><fo nt size="1">(only enter the numbers) example 6045555555</font></td>
    </tr>
    <tr>
    <td>Select Your Carrier</td>
    <td>
    <select name="Carrier">
    <option value="@tmomail .net">T-Mobile (USA)</option>
    <option value="@message .alltel.com">Al ltel Wireless</option>
    <option value="@mms.att .net ">AT&T Mobility (formerly Cingular)</option>
    <option value="@cingula rme.com">Cingul ar (Postpaid)</option>
    <option value="@cwemail .com">Centennia l Wireless</option>
    <option value="@cingula rme.com">Cingul ar (GoPhone prepaid)</option>
    <option value="@fido.ca ">Fido (Canada)</option>
    <option value="@pcs.rog ers.com">Rogers (Canada)</option>
    <option value="@messagi ng.sprintpcs.co m">Sprint (PCS)</option>
    <option value="@page.ne xtel.com">Sprin t (Nextel)</option>
    <option value="@vtext.c om">Verizon</option>
    <option value="@vmobl.c om">Virgin Mobile (USA)</option>
    <option value="@vmobile .ca">Virgin Mobile (Canada)</option>
    </select>
    </td>
    </tr>
    <tr>
    <td colspan="2">
    <textarea name="YourMessa ge" cols="142" rows="5" style="width:50 0px">Only 142 characters can be sent!</textarea>
    </td>
    </tr>
    <tr><td colspan="2"><in put type="submit" value="Send Message to Phone"></td></tr>
    </table>
    <p>*Standard text messaging rates apply.</p>
    </form>
    </body>
    </html>

    [/code]

    Comment

    Working...