I need to write a .NET application that listens to a SMS message , and then react to it.
I assume i need a SMS gateway to interface between my application and the sender of the SMS.
How could i implement this . Would the listening program need to be a web service or something else ?
Please give me your ideas.
Thanks,
Chak
You will need an SMS gateway.
Alot of SMS gateways allow you to send replies from SMS to email. Then all you need to do is retrieve the message via POP and do something.
SharpWebMail is open source. Should be samples of how to do that in there somewhere.
http://csharp-source.net/open-source/web-mail
Hope that helps.
One easy way to do it (if it fits your architecture) is to just simply use a mobile phone and have code on it that intercepts the message and the forwards it to your application.
If you want to use .net, you can use a Windows Mobile phone and use the MessageInterceptor class with .NET Compact Framework. Then, when you have your message, use whatever method you want to forward it to your app (sockets, serial ports, web services, ...).
You first need to find an SMS provider, and then ask them how they integrate. There is no standard way to do this, and everyone use their own approach.
You do at least need something that will receive the SMS for you. That might be a GSM modem or some form of SMS gateway. How you implement the technical part of “receiving an SMS” is specific to the tool you use. You can talk to a GSM modem via serial port (or TCP), SMS gateways often use SMPP or HTTP to transfer SMS.
Related
I'm looking for information about how binary SMS are implemented on iPhone.
Particularly I would like to know what you need to do (if it is possible) in an iOS application to
listen to a specific SMS port and
then be notified of a dedicated incoming binary SMS.
Of course, I'm looking for a solution based on official (public) APIs.
There is no offcial API to access SMS database of iphone without jailbreaking of it.
You can't, you can only send a SMS via de official API. You can't read the SMS inbox let alone listen for incoming SMSes.
i want to this:
When a new user want ta register to my site, he/she must enter GSM number on registration form
and activation code sent with a SMS message and e-mail.
he/she must enter SMS activation code and e-mail activation code for complete joomla new user register process.
Is this possible? Can i do that?
yes, But you have to think a lot about integration your implementation with Joomla.
You have 2 approaches to send SMS messages.
1. Using a GSM modem
Here you will need dedicated hardware to do this. You will need a GSM modem + A dedicated server/machine. You have to write to the serial port using appropriate language and use AT commands to send sms messages. Here the advantage is everything is yours so you have total control over everything. You will be able to find a cheap mobile service provider for this.
2. Using an SMS Gateway
Based on your requirement of integrating this with Joomla, this might be the easy approach. In this way you have to send http, https request to a certain URL with the message information and authentication details. The gateway will handle the rest. Alternatively you can choose SMTP as gateway protocol and reuse your email implementation. When you send an email to a certain preconfigured address it will generate an SMS with contents of the email message.
Clickatell is an example for such service providers.
I need to be able to send a pre-formatted email or SMS text message programmatically from within an iphone app. Can this be done? I have looked at apple's MFMailComposeViewController class, but this "provides a standard interface that manages the editing and sending an email message" and the MFMessageComposeViewController class also has it's own "standard system interface for composing SMS text messages". These allow you to present an interface to the user where they have to fill in all the data and then explicitly press a send button.
I cannot use this boilerplate functionality.
I need to be able to send a message without presenting any interface to the user. I know this sounds evil, but actually it is for a commercial application which needs to communicate to a user group in a central office when users in the field have performed specific actions out in the field.
Has anyone found a solution to this?
After much investigation, I have found that sending emails programmatically, without user intervention, from an iphone application, cannot be implemented using any of the apple frameworks.
Set up a web service you can post to using an HTTP request. If you are posting to only one address this can work very well, although you may want to get the user to input their return mail address.
Otherwise only the standard dialog is available (this relies on using whatever account they've setup on the device).
Here are a few SMTP API's that work on OS X. They might work on iOS as well.
Pantomime
MailCore
EdMessage
Only Possible via Web Interface, you can not hide the Interface , this is as per apple Guidlines to Developer and as per documentation
Looking for a solution to such a problem, I found something interesting here: How to send mail from iphone app without showing MFMailComposeViewController?
I hope this will be useful!
This is standard not possible. If you can't use the standard dialog you need to use SMTP.
SMS is the same, use the dialog of use a webbased sms service (most of these cost some money).
I have no experience with iOS, but I have enough experience with email protocols to say I'd be very surprised if a client application could send email without accessing a server. More than likely, the email will be sent using the SMTP protocol and therefore must be sent using an SMTP server. Choosing how you connect to that server is about the only option you have. You could connect to a server-side script (such as php) to generate and send the email, or you may be able to create a socket and connect directly to port 25 on the SMTP server and still generate the email from you client application.
Check out:
RFC 5321 at https://www.rfc-editor.org/rfc/rfc5321
SMTP on Wikipedia at http://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol
You could always do a low level telnet using SMTP protocol to a known mail server to send a message. I don't know if Apple will reject the app, but SMTP is damned simple.
I don't want my app to probe the nether parts of the iPhone... just use the modem to send a simple SMS message. Is this a deal-breaker with Apple? Why?
I'm considering a workaround where outgoing SMS are routed to a URL I set up to bounce the message on to the intended recipient. Do you think this is a feasible route to consider?
How to programmatically send SMS on the iPhone?
basically, you can open the sms app but you'll have to route through an (internet-based) sms gateway if you don't want to leave your app to send it.
SMS may be limited by the phone operator. This is a no-go if the user doesn't know a SMS is being sent.
Besides, interacting with something low-level like a device seems to be something Apple wouldn't like.
I don't know enough about phone protocols to be of any other help, though.
first of all thanks a lot to all of you for past valuable suggestions,we are creating an application where on certain events wants to send email/sms to specified phone number we already tried with the openURL call but it opens the existing inbuilt email/sms application of the iphone.Our requirement is to send sms/email without opening the inbuilt iphone email/sms application is it possible if yes what are the supported API's to achieve it.
thanks in advance.
You can do this with a short code by way of a SMS/MMS aggregator like OpenMarket or as another person has posted you can use the SMS Gateway but this requires the knowledge of the end users carrier name. If your replying to a SMS on the iPhone I believe you can use the API which in turn would give you the carrier id of the incoming SMS message you would like to reply to.
Maybe you could explain your problem a little more so we can better grasp your question.
You can see my other answer from a similar question. Basically you can send an email to the phone if you know the provider. The provider will then format the email into a SMS message.