2

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?

Community
  • 1
  • 1
RDinoso
  • 41
  • 2
  • 6

0 Answers0