unable to send sms via smpp account - java

i tried to send sms via smpp account and i have the error "'Must be bound to the SMSC before sending packets", the problem is that when i checked the smpp account, it is connedcted to SMSC, but sms are not going, sms are not even reaching the SMSC. please can somebody help

the SMPP protocol expects the client to
connect
authenticate
you need to identify the user credentials for your client and authenticate before you send an sms to the Gateway.
also, the SMPP server must be returning an error code, it would be helpful to post that as well.

Related

GMailSender on Android causing Relay Access Denied Error

I have a app through which you can send a email. This is done using the following code. The sender account is an GMail account:
GMailSender sender = new GMailSender("sender#gmail.com", "APassword");
sender.sendMail(subject,
emailText[0],
"sender#gmail.com",
receiver);
The receiver varies for testing reasons, but should be static when the app is released. Now I started testing by sending mails to another GMail account, which works fine. I continued to send mails to an outlook account, also works great. When I send emails to a private email server though, I get the following message back:
Delivery to the following recipient failed permanently:
booking#reciever.de
Technical details of permanent failure: Google tried to deliver your
message, but it was rejected by the server for the recipient domain
reciever.de by mail.reciever.de. [88.198.227.52].
The error that the other server returned was: 554 5.7.1
: Recipient address rejected: Relay access denied
I tried to figure out what this error is about, yet I have not completely understood it. I guess GMail doesn't like the receiver domain and thus does not send the email.(?)
How can I get GMail to ignore it and send it anyway? Or what else can I do to send the email? I would also greatly appreciate if someone could elaborate on this error, it is not much or well explained on the internet yet.

How to receive incoming message on the twilio android client? Is there any way to receive sms/MMS on android client

I am developing an application in android (Twilio Android Client) using Twilio, which consumes the Rest API.
I can successfully send the SMS using the rest API. However, when someone replies to SMS/MMS, the server will get that message because Twilio will hit that URL.
But on the other hand, I don't understand how to update the client device when we receive an SMS/MMS using Twilio.
Is there any way to update or send the message (SMS/MMS) to the client device when a server receives an incoming message(SMS/MMS)?
You can configure a URL for SMS/MMS in your twilio number. Now, when the user replies to this number, this script in this URL will be executed. In this script, write code to forward SMS/MMS to your android device's phone number.
If you want to handle replies solely via your app, (ie, not by conventional SMS and MMS) then store reply SMS and MMS in server. Then write an API in server to get these messages. Now write code in android to periodically query this API and retrieve these messages.

gcm - is it possible to know if the message is sent to an offline device?

Currently, sending a message from my server gives me an OK response, meaning the message has been forwarded to GCM and it will be received by the device unless it's offline, which it will receive once it's online. Would it be possible to determine if the device hasn't received it yet because it's currently offline?
There is no way to query the status of a GCM message after it is sent. One option would be to have your app request a delivery receipt, or manually ack the message via HTTP. Then if your server doesn't get the ack within a certain time you could then send via SMS.
As you then end up sending some messages via GCM and SMS, you will need code to de-duplicate the messages in your app.
now GCM support "message delivered to device", just set "delivery_receipt_requested": true and deal eith incomming ack..
see this
It seems you are using HTTP protocol for sending messages.
If you use XMPP instead, and add "delivery_receipt_requested": true to your JSON, GCM will send a Delivery message to you upon Delivery. (you can find the documents here)
Otherwise you have to handle it manually on HTTP.

Connect my exist server to GCM

I developed a client on android app and a server, but now I discovered the GMC- "Google Cloud Messaging for Android"
Is there any way to connect the GCM to my server, without changing everything?
The client send data to the server with socket, and what I need is that the server will send the data to the GCM, and the GCM will send the data to all the clients.
I don't need the clients to send data to the GCM, all what I need is :
client -(socket)--> server ---> GCM ---> clients
Someone have any idea how to do that?
Thanks in advance!
You can send GCM messages from your Java Server. The simplest way is to use the server library supplied by Google (gcm-server.jar).
The code for sending a message is as simple as :
Sender sender = new Sender(apiKey);
Message message = new Message.Builder()
.delayWhileIdle(true)
.addData("key1", "value1")
.addData("key2", "value2")
.build();
Result result = sender.send(message, registrationId, numOfRetries);
In addition, you'd have to check the result, to see if your message was accepted or rejected by GCM server.
This example shows how to send a message to a single device. There's a similar way to send the same message to multiple devices.
Finally, you'll have to implement some web service that accepts a registration ID from your app, and saves it in your DB.

Send/Receive SMS Messages Through the Gmail SMS Plugin

I am trying to send/receive SMS messages through the Gmail SMS plugin with Java, but I am not sure which Gmail Java client library would be best for this. I have hear of g4j and the google-java-client-api but I am not sure those are suitable. I have hear of the method of where you can send an SMS through SMTP, but you need to know the recipient's carrier's SMTP server, which is a little complicated since I would like to send an SMS to a phone number without knowing the carrier of the recipient. Any suggestions? Thanks!

Categories

Resources