Plz check and tell me the error in this code

require ‘net/smtp’

message = <<MESSAGE_END
From: Private P. [email protected]
To: A Test User [email protected]
MIME-Version: 1.0
Content-type: text/html
Subject: SMTP e-mail test

This is an e-mail message to be sent in HTML format

This is HTML message.

This is headline.

MESSAGE_END

Net::SMTP.start(‘localhost’) do |smtp|
smtp.send_message message, ‘[email protected]’,
[email protected]
end

Please give the error message you receive.
I think the most likely reason for a failure would be that you don’t
have an SMTP server…

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs