Sending Automated SMS Messages
Asked Answered
I

7

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 [email protected]. 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.

Ignatia answered 10/6, 2009 at 16:16 Comment(2)
i've used twitter as my gateway before, it wasn't reliable before but its pretty solid now.Phototonus
@Phototonus - Can you give an example of how to do this?Ignatia
P
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.

Powers answered 10/6, 2009 at 16:19 Comment(0)
S
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.

Salespeople answered 10/6, 2009 at 16:25 Comment(0)
A
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.

Athanasian answered 10/6, 2009 at 16:22 Comment(2)
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.Ignatia
It would, of course, require a commercial texting plan tied to the SIM used in the modem.Manhour
C
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.)

Catamenia answered 10/6, 2009 at 16:29 Comment(0)
E
1

There is a global email to SMS gateway, that you can use using the format [email protected] i.e. [email protected], and put the message in the subject line.

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

Dan.

Esbenshade answered 28/10, 2009 at 20:52 Comment(0)
M
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.

Mcmullin answered 22/6, 2015 at 9:18 Comment(0)
I
-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}[email protected],{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/.

Ignatia answered 10/6, 2009 at 19:9 Comment(3)
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.Incommensurable
Maybe. This isn't something I would do for a client. It was for fun.Ignatia
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.Hamrnand

© 2022 - 2024 — McMap. All rights reserved.