Sending Personalized SMS

+6587654321|Kevin
+6598765432|Foo
def send(strPhoneNumber, strMessage)
`./adb shell service call isms 7 i32 0 s16 "null" s16 "#{strPhoneNumber}" s16 "null" s16 "'#{strMessage}'"`
end

template='Hello %s'
rows=(`cat list.txt`).split("\n")
for z in 0..rows.length-1
row=rows[z]
phone_number=row.split('|')[0]
name=row.split('|')[1]
message=template % [name]
send(phone_number,message)
puts 'sent to %s' % [name]
sleep(1)
end
ruby send_sms.rb
brew install ruby

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store