How to send SMS message reply to email address? - android

I have a simple SMS Activity that replies to a SMS message that was sent to the phone. Some SMS messages have the originating address as an email address. How do you compose a reply SMS message that can successfully be sent back?

So the solution to this seemed to be this:
Each cell carrier has a specific SMS number that you can send a text message to in a certain format. This is called a "SMS Gateway". (Similarly, there are gateways to send SMS messages from Email addresses.)
Example:
AT&T - Send a test message to "121" or "111" and format the message like this:
"address text" -or- "address (subject) text"
If you do that and your carrier is AT&T then that SMS address will then send an email to the email address in the body of the text message.
The problem with this is that you must know the SMS Gateway number & format in for your carrier in order for this to work.
I hope someone else finds this helpfull.
P.S. I have Virgin Mobile and it turns out that since Virgin Mobile uses the Sprint network, I was able to use the Sprint SMS Gateway to send SMS messages to email addresses.

You can examine the originating address, and if it contains an # (for instance) send an email to the recipient with the reply message.
By this i mean you can launch the email client of the phone with the predefined message. Is that your intention?
If it serves your purpose you can try this:
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_TEXT, "email text");
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "Subject");
sendIntent.setType("message/rfc822");
startActivity(Intent.createChooser(sendIntent, "Title:"));

Related

android ACTION_SENDTO creates email doesn't send it

Have working code that 1) opens an email client on an android device and 2) successfully populates all the fields needed to send a message. This includes the to, from, subject and message body.
e String mailMsg = "mailto:elmer#gmail.com" +
"?cc="+"" + //needed to fill out email properly
"&subject=" + Uri.encode(subject) +
"&body=" + Uri.encode(emailBody);
Intent emailIntent = new Intent(Intent.ACTION_SENDTO);
emailIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
emailIntent.setData(Uri.parse(mailMsg));
try{
context.startActivity(emailIntent);
}catch (ActivityNotFoundException ae){
Log.d("TEST100 ","Error sending email");
}
Again the code works fine in terms of opening the email client, creating an populating the email message but, it does not send the email. Could it be because I have multiple email providers? The code always manages to connect to and work with my mai based provider.
Have read the google documentation and most relevant posts in stackoverflow, is it possible to:
1. trigger the sending of the email message without user involvement?
2. mask the display/process of creating the email?
Any information appreciated
is it possible to: trigger the sending of the email message without user involvement?
Fortunately, no.
mask the display/process of creating the email?
Fortunately, no.
Malware authors, spammers, and the like would love to have the ability to send an email, without user involvement, using the user's own email account. Most users would find this behavior to be inappropriate.
If you want to send an email without user involvement, have your Web service send the email on your behalf, using your own email account and your own mail server.

How to get the SMS sender address in Android

I'm new to Android. I'm developing an application and I need to fetch the sender while parsing the message. We will be receiving biz messages like IM-ICICI, fb-623525 etc. I want to know how can I get the SMS address of such alphanumeric character senders.

It is possible to hide the destination email address?

In my app I have an option, "Contact us", but anyway, I would like that the user to not see the email address where they send the email. I use the standard way to send the email, but however I build the interface, when the Email Client starts the destination email is shown.
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL , new String[]{"myemail#gmail.com"});
i.putExtra(Intent.EXTRA_SUBJECT, "Subject");
//i.putExtra(Intent.EXTRA_TEXT , "emailBody");
try {
startActivity(Intent.createChooser(i, "Send mail..."));
} catch (android.content.ActivityNotFoundException ex) {
Toast.makeText(SecondActivity.this, "There are no email clients installed.", Toast.LENGTH_SHORT).show();
}
I would like that myemail#gmail.com to be undisclosed to users.
Over the internet we find this in many cases, where just a button "Send" is provided, for example, but how could we do this on Android?
I would like that myemail#gmail.com to be undisclosed to users.
If you wish to use ACTION_SEND, the user has the right to know the content they are sending and the email address they are sending it to, and to modify any of that as they see fit. It is their device, their email account doing the sending, and their bandwidth that is being consumed.
Over the internet we find this in many cases, where just a button "Send" is provided
The Web server is sending the email, rather than asking the user's browser to send the email.
how could we do this on Android?
You are welcome to find a JavaMail port for Android, or an equivalent library, and send the email directly yourself. Of course, you will need to configure your app to know an SMTP relay that you can use to do the sending.

Android: How to send SMS to email account

The stock Android text messaging app allows you to send SMS to an email account instead of a phone number. How is this done? I tried the following code and it failed.
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage("myaccount#gmail.com", null, textMsg, sentPI, null);
This other question seems to be related How to send SMS message reply to email address?
... but the accepted answer says
Each cell carrier has a specific SMS number that you can send a text message to in a certain format. This is called a "SMS Gateway".
I want to send to my gmail account, not to AT&T.
Sorry, seems I misread the answer. Looks like my carrier (AT&T) will send the email for me. What puzzles me is how an app could work for different carriers?

how can we get E-mail receiving notification in android

how can we get E-mail receiving notification in android
same with me also
can we get info by registering a content observer like this
ContentResolver contentResolver = getContentResolver();
m_EmailObserver = new EmailObserver(this);
contentResolver.registerContentObserver(ContactsContract.CommonDataKinds.Email.CONTENT_URI, true, m_EmailObserver);
in email observer we can read email recieved
is it not correct way to get email notifiactions
There is no such thing as "E-mail receiving notification in android", any more than there is "E-mail receiving notification" in Windows. Email is received by applications, not by the operating system. Individual email applications may or may not send out broadcast Intents advertising the receipt of email -- you would have to contact the developers of those applications to find out.

Categories

Resources