2

Is is possible to send an SMS message out of a batch script in Windows? Any SMS gateway, that supports it? etc.

colemik
  • 1,417
  • 2
  • 20
  • 24

2 Answers2

2

If you have an iPhone that you are willing to jailbreak, you can find a package in Cydia called SendSMS. You will also need to install OpenSSH. After you have done these, you can use putty (more specifically plink) to SSH into your iPhone, execute SendSMS as it's initial command and then close. This can all be done from a BAT file.

plink -pw alpine -ssh root@192.168.1.4 sendsms +61400000000 Testing

Replace alpine with whatever you set your SSH password to (alpine is default), root@192.168.1.4 with root@--your iPhone's IP address--, +61400000000 with the number you are going to send to, and Testing with your message.

Make sure you haven't set a different host or port as default settings in Putty, or you will get strange results.

Plink can be found here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Please note that the cost of the SMSs will be charged to your phone

OpenSS
  • 93
  • 5
1

Most SMS enabled phones also are enabled to recieve SMS messages via email. The phone usually has an address such as phonenumber@carrier.com, though it varies by carrier. Using this, you can set up your batch script to send an email to the phone, which arrives as an SMS message. At my last job, this is how servers were set up to send alerts to the support staff.

I have seen other options for setting up sending an actual SMS from a machine, but every example I saw required attaching a GSM enable device to the machine via serial, bluetooth or USB to be used as essentially a modem to send the messages.

BBlake
  • 2,388
  • 1
  • 22
  • 31
  • This is great news. BBlake is the "recieve SMS messages via email" part linked to the phone or to the SIM card. For example I want to put my SIM card into an Arduino shield.. So if it's only dependent on the SIM card then it should work...but if it's dependent on the phone then I'll be out of luck. – Jonas Apr 13 '17 at 13:16
  • TBH, I have no idea. I haven't done anything with SMS or even phones in years and I don't remember much of what we did do back then. It seems like there should be a way since so many devices have SIM cards and cellular connections nowadays. – BBlake Apr 15 '17 at 01:01