0

I have a ruby program that is supposed to send e-mails, and the exact code worked before, but won't work now. Can anyone help me understand why? Here's the code:

STDOUT.sync = true
require 'net/smtp'
require 'rubygems'
require 'hpricot'
require 'open-uri'

  Net::SMTP.start('smtp-server.cfl.rr.com', 25) do |smtp|
    
         smtp.open_message_stream('MBECK88@cfl.rr.com', ['mbeck@knights.ucf.edu']) do |f|
     
           f.puts 'From: matt'
     
           f.puts 'To: mbeck@knights.ucf.edu'

           f.puts send

          end
        end
2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by tiger86
0

The possible problems are listed below along with the solution
(A a gem that is required is no longer on your server
(B your server provider upgraded their Ruby and one of your gems isn't compatible with the new version
All you have to do is check to make sure you have all of the required gems, and if you do make sure you haven't updated one of them lately, sometimes you have to change your code a smidgen when you update a gem. If that's all fine there, then contact your server provider and see if they've updated the Ruby version, if they have find out what version they upgraded to and what you need to do to your script to make it work.

If this is a third party script that is updated, their may be a newer version that is already compliant with an updated Ruby version. If this solved your problem, please click problem solved.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.