pradeep.cbp has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on mail from one email id to other email id

Replies are listed 'Best First'.
Re: mail from one email id to other email id
by karlgoethebier (Abbot) on Jan 08, 2014 at 09:20 UTC
Re: mail from one email id to other email id
by mbethke (Hermit) on Jan 08, 2014 at 09:19 UTC
    It would be easier to help you if you just explained
    a) what you are trying to achieve (Local mail or remote? On what system? What for?) and
    b) what you've tried already.

    Your errors look like you're trying to send local mail and something about the mail delivery system is misconfigured, but that's just a guess.

      Thanks
      I am running some scripts in linux and i am getting TEXT output for that scripts.It takes some time to execute.
      I have a script to keep track of this output. As soon as i get output I need to send this TEXT output to remote email id .
      Only thing I need is , perl script to send this Text from my email id to other email Id.
        Sorry for the late reply but I think the shell is all you need:
        script.pl | mail some@one.net
Re: mail from one email id to other email id
by nithins (Sexton) on Jan 08, 2014 at 08:24 UTC

    if ur using linux machine, hope this code will help you

    #!/usr/bin/perl use strict; use warnings; print "Content-type: text/html\n\n"; my $title='some title here'; my $to='nn@nn.com'; my $from= 'aa@aa.com'; my $subject='subject info here'; open(MAIL, "|/usr/sbin/sendmail -t"); ## Mail Header print MAIL "To: $to\n"; print MAIL "From: $from\n"; print MAIL "Subject: $subject\n\n"; ## Mail Body print MAIL " Info On:".localtime()."\n"; print MAIL `df -h`."\n"; print MAIL "------------------------------------------------------- +--\n"; print MAIL `free`."\n"; print MAIL "------------------------------------------------------- +---\n"; close(MAIL); print "<html><head><title>$title</title></head>\n<body>\n\n"; ## HTML content sent, let use know we sent an email print "<h1>$title</h1><p>A message has been sent from $from to $to</p +></body></html>";

      Thanks for the solution
      I tried with the above code and i am getting error as follows and dont we need to login to sender email id:?
      df: `/var/vob/a_gold/c65_iw522_dig/vob': Permission denied
      df: `/var/vob/a_gold/c65_iw522/vob': Permission denied
      df: `/var/vob/ecubes/ecubes_hw/vob': Permission denied
      df: `/var/vob/egv3_pmu/c65_iw522_dig/vob': Permission denied