K
kd
Hi all,
I am working on a program which uses sendmail.I found that the sendmail
directory was located at /usr/sbin/sendmail. I try to execute the
following piece of code. But the program shows any errors nor executing
it properly.Could you please let me know what the problem could
be.Thanks in advance.
- Karthik
===================================================
#!/usr/bin/perl/
use strict;
use diagnostics;
use warnings;
system('clear');
open(SENDMAIL,"|/usr/sbin/sendmail -oi -t -odq")or die "Can't fork for
sendmail: $!\n";
print SENDMAIL <<"EOF";
From: Karthik <karthik\@kmail.com>
To: Karthik <karthik\@kmail.com>
Subject: A relevant subject line
Hey Wats up !!
EOF
close(SENDMAIL) or warn "sendmail didn't close nicely";
===================================================
I am working on a program which uses sendmail.I found that the sendmail
directory was located at /usr/sbin/sendmail. I try to execute the
following piece of code. But the program shows any errors nor executing
it properly.Could you please let me know what the problem could
be.Thanks in advance.
- Karthik
===================================================
#!/usr/bin/perl/
use strict;
use diagnostics;
use warnings;
system('clear');
open(SENDMAIL,"|/usr/sbin/sendmail -oi -t -odq")or die "Can't fork for
sendmail: $!\n";
print SENDMAIL <<"EOF";
From: Karthik <karthik\@kmail.com>
To: Karthik <karthik\@kmail.com>
Subject: A relevant subject line
Hey Wats up !!
EOF
close(SENDMAIL) or warn "sendmail didn't close nicely";
===================================================