Start New Discussion Reply to this Discussion Ruby E-mail Fail
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
Related Article: Old perl site - need help with code
is a solved Web Development discussion thread by Dustymunchkin that has 1 reply, was last updated 2 years ago and has been tagged with the keywords: script-configuration.
mattitude
Newbie Poster
10 posts since Jan 2010
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 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.
tiger86
Posting Pro
548 posts since Feb 2008
Reputation Points: 48
Solved Threads: 11
Skill Endorsements: 2
© 2013 DaniWeb® LLC
Page rendered in 0.0656 seconds
using 2.66MB