Turn your Android Phone into a SMS Gateway

Author: | Posted in Android 16 Comments

SC20130420-205340Turing your Android phone into a SMS gateway is very straight forward. All you need is “SMS Gateway” app which is freely available at Play store. SMS Gateway app is very easy to use. Its simple and rich in features. With SMS Gateway you can do lots of things such as:

  1. Periodically checks POP3 account and send contents of new emails via SMS.
  2. Enable built-in Web Server and Send SMS by HTTP GET.
  3. Forward received SMS to an e-mail address.
  4. Forward received SMS by calling remote web Server via HTTP GET.

How to send SMS?

You can send emails by two different methods.  We will learn about both one by one.

Via Email

  1. Create an POP3 enabled email id such as [email protected]
  2. Open SMS Gateway App on your Android phone. Tap at Settings button.
  3. Check “Listen for POP3 send SMS commands” checkbox.SC20130420-233409
  4. Scroll down and tap at “POP3 Settings” button.
  5. Enter your POP3 account details e.g Server, Username, Password, Port etc
  6. “Set Mailbox scan interval in seconds” to 60.
  7. Go back to home screen of SMS Gateway and tap at Start button.
  8. Write SMS recipient’s mobile number in subject line and SMS content in email body. Make sure you are sending email in plain-text format. Otherwise, outgoing SMS will be consist of garbage text.

Via HTTP GET

  1. Open SMS Gateway app and tap at Settings button.
  2. Check “Listen for HTTP Send SMS Commands” checkbox.
  3. Scroll down and tap at “HTTP Settings” button.
  4. Note down the Port number. If you want to change the port, enter the new port number here.
  5. You can also enter password. if set, password will be required for sending SMS.
  6. Go back to home screen and tap at Start button.
  7. You can now send SMS by invoking this HTTP Request (or by simply entering URL in browser’s address bar).
    http://ip-address:portnumber/sendsms?phone=1234&text=abcd&password=mypassword
    ip-address should be replaced with the actual IP of your android device and portnumber mush be same as you set in step 4. By default it is 9090.

PHP Code for invoking HTTP GET Requests

You can invoke HTTP GET requests by many different methods. for curl, file_get_contents, http_get etc.

file_get_contents

 curl

 http_get

 

  • Nidevaina

    Heeeeeeey dude!!! Thanks alot for this post, very very useful, i just want to know wich of those ways you preffer and how may I make available the http_get in my php try to explain it to Linux & Windows, thanks.

  • George First

    How do you forward sms to http? I kow there is an option and php example but it doesnt work I think.

  • Anit Gopinath

    Was very helpful !! Was tearing my hair out trying to find how to use it ! Thanks, buddy !

  • Alex Inoa

    Hi, I couldnt make it work :(, I followed all the steps. I have a couple of questions: 1. Should I have to be in the same network of the phone? or should I use the ip suggested in the app? 2. Should I use the public ip found on http://www.whatsmyip.com from my phone? 3. Should I start the Mobile Hotspot and connect my computer to the phone’s network. Please help me here. Thanks

  • Some Guy

    Hi,what about delivery reports.How do i know if it was actually delivered to the phone you were sending to?.

    • Hi, I don’t think there is any such option available in this app.

  • Sumaya Hasan

    Hi, I’m facing some issues with Long SMS. I am receiving two SMSs and I want the App to send me the SMS a one single SMS. How can I get that? Could anyone help me with that? Thanks in advance.

    • Hi, go to Settings and check ‘Send All’ radio button.

      • Sumaya Hasan

        I have already tried that. It’s the same as “Send first one only.”

        • Can you confirm if you have any special character in message? Avoid using line breaks and tabs.

          • Sumaya Hasan

            There are no tabs or line breaks in the text. Here is an example of the text:
            Name(MD),Bill Number(10170110179XXXXXX),Bill Amount(XXXX),Bill Month(XX),Bill Year(2014),Pin(XXXXXX). To pay this bill type Yespinpassword and send to XXXXX.

  • Fatih Camii

    I want enter more then one tel. number in the E-Mai subject. Is this possible and how ? Is there a limitation for the tel. numbers ?

  • Raj

    everything is perfect in this app. the big issue is. Even by changing the setting of delivery report to NO. its still using delivery report feature. and mobile company charge on every sms sent from this php code. can any one help on this please.

  • Mesbah Uddin Ahmed

    Salam,
    I am getting android.permission.READ_PHONE_STATE error in android marshmellow 6.0. What can I do ?