I am just a beginner in c# and I need your help regarding this project.I need some help reg How to send a SOS message to selected contacts from my mobile phone to other phones at a click of a button and help with some code is appreciated.
Asked
Active
Viewed 127 times
1
-
What have you tried? could you show us some code? It will increase the chances of getting better response. – ChintanShah25 Nov 29 '15 at 05:29
1 Answers
0
There are a bunch of services that will take your money and make this easier on you, but we've achieved this by attempting the major carriers (ie. 5555555555@txt.att.net for AT&T)
Its a workaround, but its free and simple to implement using standard SMTP stuff (GMail in this Example):
var client = new SmtpClient("smtp.gmail.com", 587)
{
Credentials = new NetworkCredential("fromuser@gmail.com", "pass"),
EnableSsl = true
};
client.Send("fromuser@gmail.com", "5555555555@txt.att.net", "", "textbody");
client.Send("fromuser@gmail.com", "5555555555@vtext.com", "", "textbody");
client.Send("fromuser@gmail.com", "5555555555@txt.att.net", "", "textbody");
client.Send("fromuser@gmail.com", "5555555555@txt.att.net", "", "textbody");
...
Then you write code to monitor the email address inbox for failures, and mark those in the database, so the next time you send the text you know which carrier to use.
One comprehensive list of carrierscan be found here:
http://martinfitzpatrick.name/list-of-email-to-sms-gateways/
And there are plenty of others