0

i´m trying to send an email from ruby but I get an error msg. I have this code:

    require 'net/smtp'

message = <<MESSAGE_END
From: Private Person <[email protected]>
To: A Test User <[email protected]>
Subject: SMTP e-mail test

This is a test e-mail message.
MESSAGE_END

Net::SMTP.start('smtp.test.net', 25,   'test.com',  'usr', 'pwd', :login) do |smtp| 

  smtp.send_message message, '[email protected]',     '[email protected]'
end

Error msg is: C:/Archivos de programa/BitNami Redmine Stack/ruby/lib/ruby/1.8/net/smtp.rb:948: in check_auth_continue': 502 unimplemented (#5.5.1) (Net::SMTPSyntaxError) from C:/Archivos de programa/BitNami Redmine Stack/ruby/lib/ruby/1.8/net /smtp.rb:740:inauth_login' from C:/Archivos de programa/BitNami Redmine Stack/ruby/lib/ruby/1.8/net /smtp.rb:921:in `critical'

Thanks

1 Answer 1

1

Unless you absolutely need to manually talk SMTP, I'd use either ActionMailer (from Rails), or maybe Pony. They provide really simple interfaces and deal with the STMP for you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.