require 'net/smtp'
require 'smtp-tls'
require 'rubygems'
puts "How many times do you want to bomb 'em?"
x = gets.to_i
puts "What's your gmail account? (Without @gmail.com)"
username = gets.chomp
from = username
puts "Password for that account?"
password=gets.chomp
puts "What's the number you want to bomb?"
victim = gets.chomp
to = victim
puts "What do you want the message bombed to be?"
body = gets.chomp
message = <<MESSAGE_END
From: you <#{username}@gmail.com>
To:  Victim <#{victim}@txt.att.net>
#{body}
MESSAGE_END
smtp = Net::SMTP.new 'smtp.gmail.com', 587
smtp.enable_starttls
smtp.start(Socket.gethostname,username,password,:login) do |server|
   server.send_message message, #{from}@gmail.com, #{to}@txt.att.net
end
while Times_Sent < x
Times_Sent = Times_Sent + 1
end
puts "#{Times_Sent} sent successfully!"

Here's the updated version. Weird error, I've never seen it before.

Error:

sms.rb:24:in `block in <main>': wrong number of arguments (1 for 2) 
(ArgumentError)
from C:/Ruby191/lib/ruby/1.9.1/net/smtp.rb:526:in `start'
from sms.rb:23:in `<main>'
-- 
Posted via http://www.ruby-forum.com/.