From: mathew Date: 2006-01-04T05:03:49+09:00 Subject: Re: Need Help Using Net::SMTP Dan Diebolt wrote: > I am trying to send email from my comcast email account (say me@comcast.net) to my yahoo email accout (say me@yahoo.com) from a ruby script using net/smtp: > > require 'net/smtp' > Net::SMTP.start("smtp.comcast.net", 25,"localhost","user","pass") do |smtp| > smtp.send_message "hello","me@comcast.net","me@yahoo.com" > end > > After trying the above ruby in irb I get the following message with no email delivered: > > => "250 Mail queued for delivery.\n" > > I don't understand how the third argument to Net::SMTP.start should be specified; its called "helo" and documentation says it defaults to 'localhost.localdomain'. I would appreciate it if anyone could point out what I am doing wrong. You should probably read the SMTP protocol spec in the SMTP RFC linked to at the top of the documentation for Net::SMTP (RFC2821). Maybe your copy is out of date, in which case try You should also note the bit that says: This library does NOT provide functions to compose internet mails. You must create them by yourself. If you want better mail support, try RubyMail or TMail. You can get both libraries from RAA. (www.ruby-lang.org/en/raa.html) The thing you are attempting to send (the word "hello") is not an Internet format e-mail. Look at the example for Net::SMTP, or read RFC2822, also linked to from the documentation for Net::SMTP. The HELO parameter is the fully-qualified DNS name of your system. The server you are connecting to may or may not choose to check that (a) it resolves to a real IP address, and (b) it resolves to the same IP address you're connecting from. Again, the documentation mentions this. mathew -- My parents went to the lost kingdom of Hyrule and all I got was this lousy triforce.