From: Brian Candler Date: 2010-08-17T23:31:42+09:00 Subject: Re: SMTP SMS Reminder Script Hd Pwnz0r wrote: > Brian Candler wrote: >> Hd Pwnz0r wrote: >>> username = gets >> ... >>> password=gets >> ... >> >> Probably it's the newline on the end of the username and password. Try >> >> username = gets.chomp >> password = gets.chomp > > I've tried that previously, the script just sits there until I interrupt > it. Sure. So you have another bug. To be sure, try typing a wrong password and see if it's rejected. Try adding some STDERR.puts "..." lines to see how far you're getting. I note some strange things in your script: Net::SMTP.start('smtp.gmail.com', 587, 'gmail.com', username, password, :plain) do |smtp| smtp.send_message message '@gmail.com' #<< this line does nothing '@txt.att.net' #<< this line does nothing end and: while Times_Sent < x Times_Sent = Times_Sent + 1 # This just loops until Times_sent == x end I suggest you start with the simplest possible script - which sends one E-mail - before making it more complex. Google for "ruby Net::SMTP gmail" to find some working examples. -- Posted via http://www.ruby-forum.com/.