I'm now writing a simple perl program that is to retrieve data form data from the web and then mail the data to a person! but I faced a problems in the send mail part! Can anyone help to find out the problems?
open (MAIL, "|$/bin/lib/sendmail email@example.com") || die "Can't open /bin/lib/sendmail!\n";
print MAIL ("To: $mailaddr\n");
print MAIL ("From: SunFlower Form Enquirer\n");
print MAIL ("Subject: Form Response\n\n");
#end of my code
The problem is that whenever I put
print MAIL ("XXXXX");
sentence inside between the
open (MAIL, "...") and close(MAIL)
ERROR messages prompt that "BROKEN PIPE"
but if I won't put print sentence inside that everything alright.. but also no mail is sent!