We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,007 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
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
2
Contributors
1
Reply
6 Days
Discussion Span
2 Years Ago
Last Updated
2
Views
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

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
 
© 2013 DaniWeb® LLC
Page rendered in 0.0656 seconds using 2.66MB