SMTP is a Protocol, which uses standard commands to send mail. I want to use it. So there is already an implementation written. So I'm not going for IO or Sockets.. I want to make it work. Please, I need some workable parameters. Help. And it dies, simply. Don't know what goes on beneath the surface...
On Tue, Apr 24, 2012 at 6:26 AM, Michael Rasmussen <mich...@jamhome.us>wrote: > On Tue, Apr 24, 2012 at 01:54:15AM +0530, Somu wrote: > > Hi everyone... > > Why isn't it happeing!!?? > > > > Just the code from Net::SMTP docs > > > > __________________________________________________________ > > > > use strict; > > use warnings; > > use Net::SMTP; > > > > #these 3 lines bring the output mx.google.com > > # my $smtp = Net::SMTP->new('smtp.gmail.com') or die $!; > > # print $smtp->domain,"\n"; > > # $smtp->quit; > > > > > > > > #but for this... > > my $smtp = Net::SMTP->new('smtp.gmail.com') or die $!; > > > > $smtp->mail('som....@gmail.com') or die $!; #it dies here. No > errors. > > Does it die or does it hang? > When I tried this, modified to connect to a bogus host, the program hung > at this point. > Editing to use a legitmate host it ran fine. > > > And how are we going to know any mailhost's address??? > > most programs/people ask the DNS system to return the mail host for any > given domain. > > > Its irritating when you fail on the first step. > > Yes it's irritating. What is your objective? To learn about SMTP and > Perl or to > just send some mail? > > If "just send some mail" consider using Mail::Sender or Mail::SendEasy. > > -- > Michael Rasmussen, Portland Oregon > Other Adventures: http://www.jamhome.us/ or http://westy.saunter.us/ > Fortune Cookie Fortune du courrier: > > Linux is not user-friendly. > It _is_ user-friendly. It is not ignorant-friendly and idiot-friendly. > ~ Seen somewhere on the net > -- Love, Somu, http://lose.yourself.mcommunity.biz http://fidel.castro.peperonity.com