6

First, we use .net & sql server.

I have a client that is interested in a system that will send SMS messages at scheduled times.

I have never done anything like this except for sending an sms through an email gateway, like 5551234444@vtext.com. But, I don't think that is an option for this as, our database will store the phone number and ignore the provider.

Thanks for any input on tackling this problem.

Jon Seigel
  • 12,251
  • 8
  • 58
  • 92
Ronnie Overby
  • 45,287
  • 73
  • 267
  • 346

7 Answers7

3

Easiest way is to use an SMS gateway who provide an API. Check out txtlocal

If you use a provider such as txtlocal you have 2 options - you can either build the scheduling into your system, or you could have a batch process which sends the sms info and the time that you want it to be sent using their API.

Macros
  • 7,099
  • 2
  • 39
  • 61
3

I've used Clickatell in the past.

They have a RESTfull API, which means sending as SMS is as easy as constructing a URL with the message and recipient's phone number.

It's not free, obviously, but it's pretty darn cheap.

Assaf Lavie
  • 73,079
  • 34
  • 148
  • 203
1

There is a global email to SMS gateway, that you can use using the format 00+countrycode+mobilenumber@smssturen.com i.e. 00447811111111@smssturen.com, and put the message in the subject line.

It's described in more detail here: http://sites.google.com/site/emailtosmsgateway/

Dan.

Dusty
  • 4,667
  • 3
  • 29
  • 35
1

Well, you either have to use an SMS gateway as you mention, or get a PCI/USB GSM modem like this one which allows you to send texts straight from the server.

Tom van Enckevort
  • 4,170
  • 1
  • 25
  • 40
  • Is the modem a free solution once installed? Is it easy to setup and use? Could you give an example of some code that might use the modem? Thanks. – Ronnie Overby Jun 10 '09 at 16:28
  • It would, of course, require a commercial texting plan tied to the SIM used in the modem. – Peter J Jun 10 '09 at 16:31
1

Have a look at this link. It gives some great info. Having said that, IMO it is easier to use a gateway (as has already been suggested.)

Khadaji
  • 2,147
  • 2
  • 17
  • 19
0

https://www.twilio.com/sms/pricing/gb

Twilio are quite cheap too.. similar to clickatell, they also have an API available but their prices appear to be cheaper at 0.04 USD ( 0.025 GBP at todays rate 22/06/2015 ) compared to clickatells cheapest rate of 0.034 GBP.

Kev
  • 743
  • 2
  • 14
  • 32
-1

:)

Here's something that I whipped up that seems to be working well:

    public static void SendSMS(string from, string number, string subject, string message, SmtpClient smtp)
    {
        long.Parse(number);

        List<string> domains = new List<string>(
            "{N}.iws@iwspcs.net,{N}@airtelap.com,{N}@airtelkk.com,{N}@alertas.personal.com.ar,{N}@bplmobile.com,{N}@cingularme.com,{N}@clarotorpedo.com.br,{N}@comcel.com.co,{N}@cwemail.com,{N}@email.uscc.net,{N}@emtelworld.net,{N}@fido.ca,{N}@gocbw.com,{N}@gsm.sunrise.ch,{N}@ideasclaro-ca.com,{N}@iwirelesshometext.com,{N}@message.alltel.com,{N}@messaging.nextel.com,{N}@messaging.sprintpcs.com,{N}@mmode.com,{N}@mms.att.net,{N}@mms.bouyguestelecom.fr,{N}@mms.mymeteor.ie,{N}@mobile.celloneusa.com,{N}@mobiletxt.ca,{N}@movistar.com.co,{N}@msg.acsalaska.com,{N}@msg.gci.net,{N}@msg.globalstarusa.com,{N}@msg.iridium.com,{N}@msg.telus.com,{N}@msgnextel.com.mx,{N}@myboostmobile.com,{N}@myhelio.com,{N}@mymetropcs.com,{N}@page.att.net,{N}@page.nextel.com,{N}@pcs.rogers.com,{N}@qwestmp.com,{N}@sms.co.za,{N}@sms.ctimovil.com.ar,{N}@sms.mobitel.lk,{N}@sms.mycricket.com,{N}@sms.sasktel.com,{N}@sms.tigo.com.co,{N}@sms.t-mobile.at,{N}@text.aql.com,{N}@text.mtsmobility.com,{N}@tmomail.net,{N}@tms.suncom.com,{N}@torpedoemail.com.br,{N}@txt.att.net,{N}@txt.bell.ca,{N}@txt.bellmobility.ca,{N}@utext.com,{N}@vmobile.ca,{N}@vmobl.com,{N}@voda.co.za,{N}@vtext.com,+48{N}@text.plusgsm.pl,297+{N}@mas.aw,977{N}@sms.spicenepal.com,{N}@orange.pl,TwoWay.11{N}@nextel.net.ar,{N}@mmst5.tracfone.com"
            .Replace("{N}", number).Split(','));

        MailMessage mail = new MailMessage();
        mail.From = new MailAddress(from);
        mail.Subject = subject;
        mail.Body = message;
        domains.ForEach(d => mail.Bcc.Add(d)); 

        smtp.Send(mail);
    }

Domains were obtained from here.

Update

Use https://www.twilio.com/.

Ronnie Overby
  • 45,287
  • 73
  • 267
  • 346
  • 4
    Unfortunately, the vast majority of emails you send with this will fail - which means that it won't take very long before the providers block you. – Aric TenEyck Jun 10 '09 at 19:20
  • Maybe. This isn't something I would do for a client. It was for fun. – Ronnie Overby Jun 10 '09 at 19:54
  • 2
    I think it is being down-voted because it isn't a usable solution. It is hack-y and could get your domain blacklisted or marked as a sender of spam. – Don Rolling Feb 10 '16 at 21:14