Hi,
Can anybody tell me what is wrong with this mail code.
What its purpose is? The script receives some values from a HTML form and send them via a mail to a specified e-mail address.
The script works, but the mail isn't sent!!!
The path for sendmail is also correct.
sub send_mail {
open(MAIL,"|$mailprog -t"
print MAIL "To: $to\n";
print MAIL "From: $mail\n";
print MAIL "Subject: Contact via de website\n\n";
print MAIL "Hoi,\n\n";
print MAIL "Ik ben $naam.\n\n";
print MAIL "Dit heb ik te vertellen:\n";
print MAIL "$comment\n\n";
close(MAIL);
}
$mailprog and $to are declared at the top of the code:
$mailprog = "/usr/sbin/sendmail";
$to="info\@dezonk.be";
The other variables are coming from the from.
Thanks in advance.
Tijs Programming is like sex: one mistake and you have to support it for the rest of your life.
Can anybody tell me what is wrong with this mail code.
What its purpose is? The script receives some values from a HTML form and send them via a mail to a specified e-mail address.
The script works, but the mail isn't sent!!!
The path for sendmail is also correct.
sub send_mail {
open(MAIL,"|$mailprog -t"
print MAIL "To: $to\n";
print MAIL "From: $mail\n";
print MAIL "Subject: Contact via de website\n\n";
print MAIL "Hoi,\n\n";
print MAIL "Ik ben $naam.\n\n";
print MAIL "Dit heb ik te vertellen:\n";
print MAIL "$comment\n\n";
close(MAIL);
}
$mailprog and $to are declared at the top of the code:
$mailprog = "/usr/sbin/sendmail";
$to="info\@dezonk.be";
The other variables are coming from the from.
Thanks in advance.
Tijs Programming is like sex: one mistake and you have to support it for the rest of your life.