I'm not sure whether this is a coding error or a problem with Sendmail. I'm writing a script that accepts input from a webpage and then emails an administrator.
The relevent section reads like this:
If $destination is, for example, firstname.lastname@example.org, everything works fine. If it is root@localhost it works fine. But if it is email@example.com (euc.org.au being one of the domains hosted inside the Signature VPS), the "Can't close pipe to Sendmail" error shows and the message is saved in ~/dead.letter.
# send the email
open MAIL, "|$sendmail -oi -t" or die "Can't open pipe to Sendmail: $!\n";
print MAIL <<"EOF";
Subject: New Activation Request from $username
I recently registered on the church website and would like you to activate my account.
My address, as listed on the Church Roll, is:
My username on the website is:
Thank you for your assistance.
close MAIL or die "Can't close pipe to Sendmail: $!\n";
Is this a scripting error, Sendmail configuration problem or a bug?