Loading ...
Sorry, an error occurred while loading the content.

Fwd: [Bioinformatics and Genomes] help-sendmail ---- /var/log/maillog

Expand Messages
  • com bio
    hello, please look at the following code. #!/usr/bin/perl unless(open (MAIL, |/usr/sbin/sendmail -t )) { print error. n ; warn Error starting sendmail: $! ;
    Message 1 of 1 , Aug 21, 2004
    • 0 Attachment
      hello,
      please look at the following code.

      #!/usr/bin/perl
      unless(open (MAIL, "|/usr/sbin/sendmail -t"))
      {
      print "error.\n";
      warn "Error starting sendmail: $!";
      }
      else
      {
      print MAIL "From: deepan\@...\n";
      print MAIL "To: combiofriends\@...\n";
      print MAIL "Subject: test subject\n\n";
      print MAIL "deepan,combiofriends test mail
      message ";
      close(MAIL) || warn "Error closing mail: $!";
      print "sendmail exit status: $?\n";
      print "Mail sent.\n";
      }



      when i run this code with the command

      $perl myprog.pl

      i got the following output

      sendmail exit status: 0
      Mail sent.

      ---------------------------------------------

      when i checked the file /var/log/maillog
      i found the following line.

      "Aug 15 18:39:00 server sendmail[19155]:
      i7DCpsEe002592: to=<combiofriends@...>,
      ctladdr=<gautam@server> (500/500), delay=2+00:17:06,
      xdelay=00:00:00, mailer=esmtp, pri=1380282,
      relay=mx4.mail.yahoo.com., dsn=4.0.0, stat=Deferred:
      Connection timed out with mx4.mail.yahoo.com."

      i did not receive the mail i sent.
      i wud like some one to guide me further.

      i use redhat 9.

      thanks in advance..
      deepan





      =====
      -------------------------------------------
      center for biotechnology
      anna university
      chennai-25
      india



      _______________________________
      Do you Yahoo!?
      Win 1 of 4,000 free domain names from Yahoo! Enter now.
      http://promotions.yahoo.com/goldrush
    Your message has been successfully submitted and would be delivered to recipients shortly.