Hello Ananthu,
A few years back I created an example in Classic ASP for a member to send SMS text to phones via a website. [
See here]
I took that code and changed it up to work in the dot.net environment. I have not tested it out but I think it should work for you. This way you don’t have to use 3rd party addons.
Happy Coding,
CroCrew~
Default1.aspx
-
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default1.aspx.vb" Inherits="Default1" %>
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
<html xmlns="http://www.w3.org/1999/xhtml">
-
<head runat="server">
-
<title></title>
-
</head>
-
<body>
-
<form id="form1" runat="server">
-
<div>
-
<table border="0">
-
<tr>
-
<td>Phone Number:</td>
-
<td><asp:TextBox ID="PhoneNumber" runat="server" /><font size="1">(only enter the numbers) example 6045555555</font></td>
-
</tr>
-
<tr>
-
<td>Select Your Carrier</td>
-
<td>
-
<asp:DropDownList ID="Carrier" runat="server">
-
<asp:ListItem Value="@tmomail.net" Text="T-Mobile (USA)" />
-
<asp:ListItem Value="@message.alltel.com" Text="Alltel Wireless" />
-
<asp:ListItem Value="@mms.att.net" Text="AT&T Mobility (formerly Cingular)" />
-
<asp:ListItem Value="@cingularme.com" Text="Cingular (Postpaid)" />
-
<asp:ListItem Value="@cwemail.com" Text="Centennial Wireless" />
-
<asp:ListItem Value="@cingularme.com" Text="Cingular (GoPhone prepaid)" />
-
<asp:ListItem Value="@fido.ca" Text="Fido (Canada)" />
-
<asp:ListItem Value="@pcs.rogers.com" Text="Rogers (Canada)" />
-
<asp:ListItem Value="@messaging.sprintpcs.com" Text="Sprint (PCS)" />
-
<asp:ListItem Value="@page.nextel.com" Text="Sprint (Nextel)" />
-
<asp:ListItem Value="@vtext.com" Text="Verizon" />
-
<asp:ListItem Value="@vmobl.com" Text="Virgin Mobile (USA)" />
-
<asp:ListItem Value="@vmobile.ca" Text="Virgin Mobile (Canada)" />
-
<asp:ListItem Value="@mmst5.tracfone.com" Text="Tracfone (prepaid)" />
-
</asp:DropDownList>
-
</td>
-
</tr>
-
<tr>
-
<td colspan="2">
-
<textarea id="YourMessage" runat="server" cols="142" rows="5" style="width:500px">Only 142 characters can be sent!</textarea>
-
</td>
-
</tr>
-
<tr><td colspan="2"><asp:Button ID="Send" runat="server" Text="Send Message to Phone" /></td></tr>
-
</table>
-
<p>*Standard text messaging rates apply.</p>
-
</div>
-
</form>
-
</body>
-
</html>
-
Default1.aspx.vb
-
Imports System.Net.Mail
-
-
Partial Class Default1
-
Inherits System.Web.UI.Page
-
-
Protected Sub Send_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Send.Click
-
Try
-
Dim oMail As New MailMessage
-
With oMail
-
.From = New MailAddress("YourMail@MyEmail.com")
-
.To.Add(PhoneNumber.Text & Carrier.SelectedValue)
-
.Subject = ""
-
.Body = YourMessage.Value
-
.IsBodyHtml = True
-
End With
-
-
Dim oSMTP As New SmtpClient
-
With oSMTP
-
.Host = "mail.yourServer.org"
-
.Credentials = New System.Net.NetworkCredential("YourMail@MyEmail.com", "Password")
-
.Send(oMail)
-
End With
-
Catch ex As Exception
-
Response.Write(ex)
-
Response.End()
-
End Try
-
End Sub
-
End Class
-
Here is a link to more Email to SMS Gateways:
http://en.wikipedia.org/wiki/List_of...ng_SMS_transit