How to send SMS messages from a Java Web Application - java

I need to implement a use case in which I need to auto-generate message to a new user to verify his mobile number by asking him to enter a number sent to his mobile in an SMS.
Does Spring Framework provide any integration support to implement such a use case?
Could someone suggest me how to do that?
Any suggestions are appreciated.
Thanks.

Sending SMS messages requires a gateway provider, e.g. Clickatell or Twilio or whatever. You then implement that provider's SDK to send messages.
It costs about $5k to setup a short code, and about $1500 per month to maintain it. Some providers, like Twilio, let you share a development short code for sending messages, but you can't receive any.
What I've done for verification is send a message via email to a phone, asking for the phone number and the provider. Then convert that into the phone's email address, e.g. 9785551234#vtext.com.

Related

Java How to send an email/sms from a Users computer

I want to send a User an email or SMS to his SmartPhone when an Alert happens on his desktop App.
How can I send an email WITHOUT supplying my log-in credentials within the App?
using smtp I need to provide my credentials, but as this is for a published application that does not sound like a good idea.
I understand this is a very general question, but I am having trouble finding a solution on the web.
I'm sorry, but you will not be able to do this, as the smtp server requires some sort of authentication, from which to send from

Sending SMS using Java

I am developing a Java web application . I will need to send SMS to a mobile user from the application . How do I achieve this without using a mobile phone for sending SMS?.
I am relatively new to Networks . Please advice .
If you are in the US you could use Twilio. It costs 1 cent per SMS and you can send the messages through their REST API. They also have Java libraries.
http://sourceforge.net/projects/java-sms-api/
http://www.ozekisms.com/index.php?owpn=581
https://www.google.com/search?gcx=w&sourceid=chrome&ie=UTF-8&q=java+sms&safe=images
You should use SMS gateway. See here some gateways
Did you make a decision of what protocol has to be used for sms sending? A lot of SMS centers provide REST or SOAP API to send SMS messages. SOAP and REST are much more simpler than SMPP protocol (that is rather low-level) to my mind.
If you will decide to use SMPP protocol, there is SMPPSim tool which is SMSC (Short Message Service Centre) simulator and allows to test SMS sending functionality in a simple way. So you don't need access to any of real SMSCs.
If your SMS provider allows to use SOAP to send SMS messages, you can use SoapUI Service Mocking that also allows to develop a client for a SOAP service without access to the real one.

How to send an email to a java program

I'd like to write a program, probably a servlet or something to run on the a google app engine that I can send an email to. So not a program to send email, but one that can receieve it and parse it.
My question is, what code or API are out there that can receive an email?
Basically on your google app engine you can use an inbound mail service.
Please see this documentation for more information.
http://code.google.com/appengine/docs/java/mail/overview.html#Receiving_Mail_in_Java
You cant send an email to a program, you send an email to a server, so what you are looking for is a way to access an email server via your program. Unfortunately there is no single solution here, you need to configure your program for every different email account/server you want to access. (If you have ever set up an account in outlook or something like it you will get the idea)
For example here is a link to the gmail api, you could use this to access gmail accounts
http://code.google.com/apis/gmail/
You need to have a mailbox to send message there and you could read messages with the code like this: http://www.java2s.com/Code/Java/Network-Protocol/GetEmailMessageExample.htm
This can be done with a built in Java library.
javax.mail
Check out this link. It should be able to help you get started.
This won't work for every mail server, but depending on your setup it might help.
To send an email to a Java program, that program must be running. Generally that means a server style (aka service) receiver is favored.
For the email to be received, the Java service must understand an email protocol. There are a number of protocols, but SMTP is the standard for receiving email. Once you have a service that understands SMTP protocol for receiving email, you have written a mail server.
Note that most people don't care to write a mail server, as a mail client needs to connect to the server and pull the email to make it readable. Keep this in mind when designing the solution to your problem.

Android, sending a voice message

I’ve built an app for a client that basically sends a standard pre written SMS to the client of my client’s phone asking for them to get in contact. Now the client would like to be able to send a pre recorded voice message to an answering service with the touch of a button, can this be done, firstly from an Android phone.
I’m guessing it can be done because when I search for an answer all I can find are apps that someone else has written that do just that.
Sometimes development tutorials can be hard to find when it comes to apps as you just get a long list of people trying to sell their apps…lol.
Does anyone know of such a tutorial?r
This is not an answer but maybe could help
I once wrote an application like that for a particular answering service for a particular provider in my country. To leave a message on their device I was basically required to compose an e-mail with a message recorded as an mp3 file and included as an attachment to the mail. I then send such mail to a specific mail address of their answering service. I had to supply credentials for the mail to be accepted. Such credentials (login/password) I obtained first by sending a specific port SMS to their service.
For composing mails with attachment I used an opensource IMAP client for Android (as a jar library added to my project). Don't rememeber which client it was but can find out.
I guess there's no common standard for that but basically all the answering services should do something similar.
Sorry if this info is too vague, I was just given the protocol of how that particular answering service was working and implemented accordingly.

Building e-mail server

I have a project with a use case where users should be able to send private messages to other users but this should be integrated with their e-mail box. They should be able to send either private messages or e-mail messages from the same screen.
My thought is to use some kind of open-source e-mail server which will dump the e-mails into MongoDB and then have my Java API pull them out and display them on the interface. And when a user sends an e-mail it is passed by the API to the e-mail server.
Is this a reasonable approach?
If you want your own server (not unreasonable in many cases), check out Apache James - an open-source Java mail server with a plug-in capability. Obviously (!) you can use JavaMail to talk to this, pull messages back etc.
Doesn't Gmail do all of this already? If you want email with chat integration,* that's the first solution that comes to mind. Why reinvent the wheel?
*and about a bajillion other awesome features

Categories

Resources