Hi, You don't need a free smtp server if you are having one in your network, it's the same as you are using for your email client like Outlook. If you are sending mail to same network you don't need to login in your mail server, you can directly send mail to anyone using the same mail server
Net::SMTP.start('smtp_server_name', 25) do |smtp| For sending mails to other mail address then you need to login to the mail server and then send the mails This code works in my case: Net::SMTP.start('smtp_server_name', 25,"example.com","username","password",:login) do |smtp| smtp.open_message_stream([EMAIL PROTECTED]', ['[EMAIL PROTECTED]) do |f| f.puts 'From: [EMAIL PROTECTED]' f.puts 'To: [EMAIL PROTECTED]' f.puts 'Subject: test message' f.puts f.puts 'This is a test message.' end end you can refer this documentation for more details http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html Regards, Prema On 2/9/07, Walter Kruse <[EMAIL PROTECTED]> wrote:
You'll need an SMTP server, try Free SMTP server from http://www.softstack.com/freesmtp.html require 'net/smtp' myMessage = <<END_OF_MESSAGE From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: My mail Message body here END_OF_MESSAGE Net::SMTP.start('localhost') do |smtp| smtp.send_message myMessage, '[EMAIL PROTECTED]', '[EMAIL PROTECTED]' end -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Andrew Sent: 09 February 2007 01:48 AM To: wtr-general@rubyforge.org Subject: [Wtr-general] Send email from Watir script Hi, Is it possible to send an email with test results from Watir script? Thank you --------------------------------------------------------------------- Posted via Jive Forums http://forums.openqa.org/thread.jspa?threadID=6493&messageID=18447#18447 _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general ************************************************************************************************************************** Everything in this e-mail and attachments relating to the official business of MultiChoice Africa is proprietary to the company. Any view or opinion expressed in this message may be the view of the individual and should not automatically be ascribed to the company. If you are not the intended recipient, you may not peruse, use, disseminate, distribute or copy this message. If you have received this message in error, please notify the sender immediately by email, facsimile or telephone and destroy the original message. ************************************************************************************************************************** _______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general
-- Prema Arya
_______________________________________________ Wtr-general mailing list Wtr-general@rubyforge.org http://rubyforge.org/mailman/listinfo/wtr-general