Hi,
I use BulkSMSGateway - ATSMS.dll for sending SMS from ASP.NET.
When I click Connect button, I am able to connect to the mobile using bluetooth successfully from my WebPage.
But when i click Send button, the oGsmModem returns error e.errorcode=4006 in the oGsmModem_OutboxSMSSent event. But i can send SMS successfully using VB.NET Windows Appication. Why it returns error in web form alone?
Please help me to send SMS from my Web Page.
Thanks in advance...
3 4017
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
Hi,
This is my code for sending SMS using BulkSMSGateway - ATSMS.dll.
I am able to connect to phone successfully. btnSend_click code is working properly. But I get e.errorcode=4006 in oGsmModem_OutboxSMSSent event after btnSend_click event.
The same sms codings work successfully using windows application. But in web application only, it returns e.errorcode=4006. I am unable to send SMS.
Please help me...
Thanks in advance.
TIP: When you are writing your question, there is a button on the tool bar that wraps the [code] tags around your copy/pasted code. It helps a bunch. Its the button with a '#' on it. More on tags. They're cool. Check'em out.
Thanks,
CroCrew~
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Mountain Bikn' Guy |
last post by:
Take some standard code such as shown below. It simply loops to add up a
series of terms and it produces the correct result.
// sum numbers with a loop
public int DoSumLooping(int iterations)
{...
|
by: aladdinm1 |
last post by:
Hi All,
I have an annoying trouble with binary serialization. I have a windows
forms application which works like a server and keeps sending data to its
clients. The data is serialized before...
|
by: Robert A. van Ginkel |
last post by:
In news:OZ0W9RsdDHA.2432@TK2MSFTNGP10.phx.gbl... I ask the question how I
can see if all the data is on the other side of the connection.
I got as answer that I should use the blocking property.
I...
|
by: Mark Waser |
last post by:
Hi all,
I'm trying to post multipart/form-data to a web page but seem to have
run into a wall. I'm familiar with RFC 1867 and have done this before (with
AOLServer and Tcl) but just can't seem...
|
by: ransoma22 |
last post by:
I developing an application that receive SMS from a connected GSM
handphone, e.g Siemens M55, Nokia 6230,etc through the data cable.
The application(VB.NET) will receive the SMS automatically,...
|
by: Lucvdv |
last post by:
I have to connect to a server set up by the government, where they used
Apache Axis to create a webservice.
The code I use to interface to the webservice is generated by wsdl.exe,
based on a...
|
by: craig.overton |
last post by:
All,
I am currently developing an FTP class in VB.NET. It's kid tested,
mother approved when trying to access an FTP Server on a Windows box
meaning I can connect, run commands, upload and...
|
by: shamirza |
last post by:
4 9 6
18.ATLAS-AJAX
Note: - As an IT professional it's useful to know what the difference
is between Hype and
usefulness. For instance if there is a new technology coming in many
programmers...
|
by: WaluigiCubed |
last post by:
Hello everyone:
I've been working on making some changes to the website for the company that I am currently an intern for. There is a function that they have in one of their files that uses...
|
by: =?Utf-8?B?R3JlZ0lJ?= |
last post by:
Hi All,
I have some problems with sending UDP packets using Winsock. I tried to send
some to a closed port, and according to the documentation on Microsoft MSDN
site...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
| |